# SOME DESCRIPTIVE TITLE. # Copyright (C) Kovid Goyal # This file is distributed under the same license as the calibre package. # # Translators: # akihiko tanae (tanaeakihiko), 2025-2026 msgid "" msgstr "" "Project-Id-Version: calibre\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2026-02-22 09:00+0000\n" "PO-Revision-Date: 2014-06-17 08:35+0000\n" "Last-Translator: akihiko tanae (tanaeakihiko), 2025-2026\n" "Language-Team: Japanese (http://app.transifex.com/calibre/calibre/language/ja/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: ja\n" "Plural-Forms: nplurals=1; plural=0;\n" #: ../../../__w/calibre/calibre/manual/regexp.rst:4 msgid "All about using regular expressions in calibre" msgstr "calibre で正規表現を利用するにあたって重要なこと" #: ../../../__w/calibre/calibre/manual/regexp.rst:6 msgid "" "Regular expressions are features used in many places in calibre to perform " "sophisticated manipulation of e-book content and metadata. This tutorial is " "a gentle introduction to getting you started with using regular expressions " "in calibre." msgstr "正規表現は、電子書籍のコンテンツと書誌に対して高度な操作を実行するために calibre のあちこちで使われている機能です。このチュートリアルは、calibre で正規表現を使い始めるための簡単な入門書です。" #: ../../../__w/calibre/calibre/manual/regexp.rst:11 msgid "Contents" msgstr "目次" #: ../../../__w/calibre/calibre/manual/regexp.rst:14 msgid "First, a word of warning and a word of courage" msgstr "最初に、警告と激励" #: ../../../__w/calibre/calibre/manual/regexp.rst:16 msgid "" "This is, inevitably, going to be somewhat technical- after all, regular " "expressions are a technical tool for doing technical stuff. I'm going to " "have to use some jargon and concepts that may seem complicated or " "convoluted. I'm going to try to explain those concepts as clearly as I can, " "but really can't do without using them at all. That being said, don't be " "discouraged by any jargon, as I've tried to explain everything new. And " "while regular expressions themselves may seem like an arcane, black magic " "(or, to be more prosaic, a random string of mumbo-jumbo letters and signs), " "I promise that they are not all that complicated. Even those who understand " "regular expressions really well have trouble reading the more complex ones, " "but writing them isn't as difficult- you construct the expression step by " "step. So, take a step and follow me into the rabbit hole." msgstr "必然的に、これは技術的なものになります。何と言っても正規表現というものは、技術的なことを行うための技術的なツールなのです。使わざるを得ない専門用語や概念が、複雑または難解に見えるかもしれません。そうした概念について、可能な限りわかりやすく説明していくつもりですが、専門用語をまったく使わずに説明するのは無理があります。そうは言っても、専門用語を見てもがっかりしないでください。新しいことはすべて説明するよう努めました。そして正規表現そのものがあやしげな黒魔術のように見えるかもしれませんが (もっとぶっちゃけると、わけのわからないランダムな文字と記号の羅列にしか見えないかもしれませんが) 決してそれほど複雑なものではありません。正規表現をきちんと理解している人でも複雑なものを解読するのは困難ですが、書くのはそれほど難しいことではありません。一歩ずつ段階的に構築していけばよいのです。ですから、一緒に最初の一歩を踏み出してみましょう。" #: ../../../__w/calibre/calibre/manual/regexp.rst:19 msgid "Where in calibre can you use regular expressions?" msgstr "calibre のどこで正規表現を使えますか?" #: ../../../__w/calibre/calibre/manual/regexp.rst:21 msgid "" "There are a few places calibre uses regular expressions. There's the " ":guilabel:`Search & replace` in conversion options, metadata detection from " "filenames in the import settings and Search & replace when editing the " "metadata of books in bulk. The calibre book editor can also use regular " "expressions in its :guilabel:`Search and replace` feature. Finally, you can " "use regular expressions when searching the calibre book list and when " "searching inside the calibre E-book viewer." msgstr "calibre が正規表現を使用する場所はいくつかあります。それは変換オプションの中の :guilabel:`検索 & 置換` 、インポート設定の中にあるファイル名からの書誌の検出、書誌を一括編集するときの検索 & 置換です。calibre の書籍エディタは、:guilabel:`検索と置換` 機能の中で正規表現を使用することができます。最後に、calibre の本の一覧を検索するときや calibre の電子書籍ビューアの中で検索をするときにも正規表現を使用できます。" #: ../../../__w/calibre/calibre/manual/regexp.rst:30 msgid "What on earth *is* a regular expression?" msgstr "正規表現とはいったい何ですか?" #: ../../../__w/calibre/calibre/manual/regexp.rst:32 msgid "" "A regular expression is a way to describe sets of strings. A single regular " "expression can *match* a number of different strings. This is what makes " "regular expression so powerful -- they are a concise way of describing a " "potentially large number of variations." msgstr "正規表現とは、文字列のセットを表現する方法です。ひとつの正規表現で、いくつもの異なる文字列に *マッチ* させることができます。これが正規表現を非常に強力にしているものです。潜在的に数多くのバリエーションを表現する、簡潔な方法なのです。" #: ../../../__w/calibre/calibre/manual/regexp.rst:34 msgid "" "I'm using string here in the sense it is used in programming languages: a " "string of one or more characters, characters including actual characters, " "numbers, punctuation and so-called whitespace (linebreaks, tabulators etc.)." " Please note that generally, uppercase and lowercase characters are not " "considered the same, thus \"a\" being a different character from \"A\" and " "so forth. In calibre, regular expressions are case insensitive in the Search" " bar, but not in the conversion options. There's a way to make every regular" " expression case insensitive, but we'll discuss that later. It gets " "complicated because regular expressions allow for variations in the strings " "it matches, so one expression can match multiple strings, which is why " "people bother using them at all. More on that in a bit." msgstr "ここでは文字列という言葉をプログラミング言語で使用される意味で使っています。文字列とは、ひとつ以上の文字で、実際の文字、数字、句読点、およびいわゆる空白と呼ばれるもの (改行、タブなど) を含みます。通常、大文字と小文字は同じものとはみなされないため、たとえば \"a\" は \"A\" とは別の文字として扱われます。calibre では、検索バーでは正規表現は大文字と小文字を区別しませんが、変換オプションでは区別します。すべての正規表現で大文字と小文字を区別しなくする設定もありますが、それは後で説明します。正規表現はマッチする文字列にバリエーションを許しているために複雑になり、ひとつの表現が複数の文字列にマッチします。人々が正規表現を使用したがらないのは、それが理由です。" #: ../../../__w/calibre/calibre/manual/regexp.rst:37 msgid "Care to explain?" msgstr "説明してもらえますか?" #: ../../../__w/calibre/calibre/manual/regexp.rst:39 msgid "" "Well, that's why we're here. First, this is the most important concept in " "regular expressions: *A string by itself is a regular expression that " "matches itself*. That is to say, if I wanted to match the string ``\"Hello, " "World!\"`` using a regular expression, the regular expression to use would " "be ``Hello, World!``. And yes, it really is that simple. You'll notice, " "though, that this *only* matches the exact string ``\"Hello, World!\"``, not" " e.g. ``\"Hello, wOrld!\"`` or ``\"hello, world!\"`` or any other such " "variation." msgstr "それこそが目的です。まず、正規表現において最も重要な概念ですが、 *ある文字列は、その文字列自体にマッチする正規表現* です。つまり ``\"Hello, World!\"`` という文字列に正規表現を使ってマッチさせたい場合、使用すべき正規表現は ``Hello, World!`` です。そうです、それくらい簡単なことなのです。ただし、これがマッチするのは ``\"Hello, World!\"`` という文字列 *だけ* です。つまり、``\"Hello, wOrld!\"`` や ``\"hello, world!\"`` など他のバリエーションにはマッチしません。" #: ../../../__w/calibre/calibre/manual/regexp.rst:42 msgid "That doesn't sound too bad. What's next?" msgstr "そんなに悪くありません。次は?" #: ../../../__w/calibre/calibre/manual/regexp.rst:44 msgid "" "Next is the beginning of the really good stuff. Remember where I said that " "regular expressions can match multiple strings? This is where it gets a " "little more complicated. Say, as a somewhat more practical exercise, the " "e-book you wanted to convert had a nasty footer counting the pages, like " "\"Page 5 of 423\". Obviously the page number would rise from 1 to 423, thus " "you'd have to match 423 different strings, right? Wrong, actually: regular " "expressions allow you to define sets of characters that are matched: To " "define a set, you put all the characters you want to be in the set into " "square brackets. So, for example, the set ``[abc]`` would match either the " "character \"a\", \"b\" or \"c\". *Sets will always only match one of the " "characters in the set*. They \"understand\" character ranges, that is, if " "you wanted to match all the lower case characters, you'd use the set " "``[a-z]`` for lower- and uppercase characters you'd use ``[a-zA-Z]`` and so " "on. Got the idea? So, obviously, using the expression ``Page [0-9] of 423`` " "you'd be able to match the first 9 pages, thus reducing the expressions " "needed to three: The second expression ``Page [0-9][0-9] of 423`` would " "match all two-digit page numbers, and I'm sure you can guess what the third " "expression would look like. Yes, go ahead. Write it down." msgstr "次は、本当に使えるもののさわりの部分です。正規表現が複数の文字列にマッチする可能性があると説明したのを覚えていますか? これが少し複雑になっていくところです。たとえば、もっと実用的な例として、変換したい電子書籍のフッタ部分に \"Page 5 of 423\" のように厄介なページカウントがあったとします。明らかにページ数は 1 から 423 まで順に増えていきますから、423 通りの異なる文字列にマッチさせる必要があります。そうでしょう? しかし、実は必要ないのです。正規表現を使えば、マッチする文字のセットを定義することが可能です。セットを定義するには、マッチさせたいすべての文字を角カッコの中に羅列します。したがってたとえば ``[abc]`` というセットは \"a\", \"b\" または \"c\" という文字にマッチします。*セットは、常にセット内の文字のひとつとだけマッチします*。セットは文字の範囲を \"理解\" します。つまり、すべての小文字とマッチさせたい場合には ``[a-z]`` を使用し、小文字と大文字にマッチさせたい場合には ``[a-zA-Z]`` を使用するといった具合です。理解できましたか? したがって ``Page [0-9] of 423`` という表現を使用すれば、言うまでもなく最初の 9 ページにマッチさせることができます。こうして必要な表現を 3 個に絞ることができます。2 個目の表現は ``Page [0-9][0-9] of 423`` で、すべての 2 桁のページにマッチします。3 個目の表現をどうすればよいかは、もうおわかりですね。はい、どうぞ。書いてみてください。" #: ../../../__w/calibre/calibre/manual/regexp.rst:47 msgid "Hey, neat! This is starting to make sense!" msgstr "すごい! 意味がわかってきました!" #: ../../../__w/calibre/calibre/manual/regexp.rst:49 msgid "" "I was hoping you'd say that. But brace yourself, now it gets even better! We" " just saw that using sets, we could match one of several characters at once." " But you can even repeat a character or set, reducing the number of " "expressions needed to handle the above page number example to one. Yes, ONE!" " Excited? You should be! It works like this: Some so-called special " "characters, \"+\", \"?\" and \"*\", *repeat the single element preceding " "them*. (Element means either a single character, a character set, an escape " "sequence or a group (we'll learn about those last two later)- in short, any " "single entity in a regular expression). These characters are called " "wildcards or quantifiers. To be more precise, \"?\" matches *0 or 1* of the " "preceding element, \"*\" matches *0 or more* of the preceding element and " "\"+\" matches *1 or more* of the preceding element. A few examples: The " "expression ``a?`` would match either \"\" (which is the empty string, not " "strictly useful in this case) or \"a\", the expression ``a*`` would match " "\"\", \"a\", \"aa\" or any number of a's in a row, and, finally, the " "expression ``a+`` would match \"a\", \"aa\" or any number of a's in a row " "(Note: it wouldn't match the empty string!). Same deal for sets: The " "expression ``[0-9]+`` would match *every integer number there is*! I know " "what you're thinking, and you're right: If you use that in the above case of" " matching page numbers, wouldn't that be the single one expression to match " "all the page numbers? Yes, the expression ``Page [0-9]+ of 423`` would match" " every page number in that book!" msgstr "そう言ってくれると思っていました。でも気を引き締めてください。まだまだよくなって行きます。セットを使用すると、いくつかの文字を一度にマッチさせることができることがわかりました。しかし文字やセットを繰り返すことも可能なのです。そうすることで、上の例でページ番号を扱う正規表現をひとつに減らすことができます。そうです、たったの 1 個です。わくわくしますか? きっとするでしょう。それは次のように機能します: 特殊文字と呼ばれるもの一部、\"+\", \"?\" および \"*\" は *それに続くひとつの要素を繰り返します* 。(要素とは、ひとつも文字、ひとつの文字セット、エスケープシーケンス、またはグループのことです。最後の 2 つについては後で説明します。要するに、正規表現の中にある任意のひとつのエンティティです) このような文字は、ワイルドカードまたは量指定子と呼ばれます。具体的に言うと、\"?\" は直前の要素が *0 または 1* 個のものにマッチし、\"*\" は直前の要素が *0 個以上* のものにマッチし、\"+\" は直前の要素が *1 個以上* のものにマッチします。いくつか例を示しましょう。正規表現 ``a?`` は \"\" (つまり空の文字列で、このケースでは特に便利ではありません) または \"a\" にマッチし、``a*`` は \"\", \"a\", \"aa\", および a が連続して並んでいる限り何個でもマッチし、正規表現 ``a+`` は \"a\", \"aa\", および a が連続して並んでいる限り何個でもマッチします (ただし空の文字列にはマッチしません)。セットについても同じことが言えます。正規表現 ``[0-9]+`` は *すべての整数* にマッチします。さてここで、読者が何を考えているか筆者にはわかります。そしてそれは間違っていません。もしこれを上記のケースでページ番号のマッチに使用したら、ひとつの正規表現だけですべてのページにマッチするのではないか? そのとおり、``Page [0-9]+ of 423`` は本の中のすべてのページにマッチするでしょう。" #: ../../../__w/calibre/calibre/manual/regexp.rst:52 msgid "" "A note on these quantifiers: They generally try to match as much text as " "possible, so be careful when using them. This is called \"greedy " "behaviour\"- I'm sure you get why. It gets problematic when you, say, try to" " match a tag. Consider, for example, the string ``\"
Title here
\"`` and let's say you'd want to match the " "opening tag (the part between the first pair of angle brackets, a little " "more on tags later). You'd think that the expression ``]*>`` will match that same opening tag- you'll see why after the next" " section. Just note that there quite frequently is more than one way to " "write a regular expression." msgstr "量指定子に関する注意点: 量指定子は通常、可能な限り多くのテキストとマッチさせようとします。ですから使用する場合には注意してください。これは \"貪欲な動作\" と呼ばれます。もちろん理由はおわかりですね。これは、たとえばタグをマッチさせようとする場合などに問題が起きます。たとえば、文字列 ``\"
Title here
\"`` から開きタグ (山カッコで囲まれた最初のパーツ、タグについては後述します) にマッチさせたいとしましょう。正規表現 ``]*>`` も同様に最初の開きタグにマッチします。理由は次の章以降にわかるでしょう。ここでは、しばしば正規表現の書き方はひとつではないということを心に留めておいてください。" #: ../../../__w/calibre/calibre/manual/regexp.rst:56 msgid "" "Well, these special characters are very neat and all, but what if I wanted " "to match a dot or a question mark?" msgstr "特殊文字ってすごいけど、ドットやクエスチョンマークにマッチさせたかったらどうすればいい?" #: ../../../__w/calibre/calibre/manual/regexp.rst:58 msgid "" "You can of course do that: Just put a backslash in front of any special " "character and it is interpreted as the literal character, without any " "special meaning. This pair of a backslash followed by a single character is " "called an escape sequence, and the act of putting a backslash in front of a " "special character is called escaping that character. An escape sequence is " "interpreted as a single element. There are of course escape sequences that " "do more than just escaping special characters, for example ``\"\\t\"`` means" " a tabulator. We'll get to some of the escape sequences later. Oh, and by " "the way, concerning those special characters: Consider any character we " "discuss in this introduction as having some function to be special and thus " "needing to be escaped if you want the literal character." msgstr "もちろんできます。特殊文字の前にバックスラッシュをつければ、特別な意味のない文字リテラルとして解釈されます。特殊文字の前にバックスラッシュをつけた組み合わせのことを、エスケープシーケンスと呼び、特殊文字の前にバックスラッシュをつけることを文字をエスケープすると言います。エスケープシーケンスはひとつの要素と解釈されます。もちろんただ単に特殊文字をエスケープするだけでないエスケープシーケンスも存在します。たとえば ``\"\\t\"`` はタブ文字を表します。エスケープシーケンスについては、また後で説明します。ちなみに、この特殊文字についてですが、この入門書の中で何か機能があると紹介する文字はどれも特殊文字であり、したがって文字リテラルとしたいときにはエスケープする必要があると考えてください。" #: ../../../__w/calibre/calibre/manual/regexp.rst:61 msgid "So, what are the most useful sets?" msgstr "一番便利なセットは何ですか?" #: ../../../__w/calibre/calibre/manual/regexp.rst:63 msgid "" "Knew you'd ask. Some useful sets are ``[0-9]`` matching a single number, " "``[a-z]`` matching a single lowercase letter, ``[A-Z]`` matching a single " "uppercase letter, ``[a-zA-Z]`` matching a single letter and ``[a-zA-Z0-9]`` " "matching a single letter or number. You can also use an escape sequence as " "shorthand:" msgstr "聞かれると思ってました。便利なセットといえば、1 桁の数字にマッチする ``[0-9]``、小文字 1 個にマッチする ``[a-z]``、大文字 1 個にマッチする ``[A-Z]``、アルファベット 1 文字にマッチする ``[a-zA-Z]``、そして英数字 1 文字にマッチする ``[a-zA-Z0-9]`` などがあります。略記法としてエスケープシーケンスを使用することもできます:" #: ../../../__w/calibre/calibre/manual/regexp.rst:69 msgid "``\\d``" msgstr "``\\d``" #: ../../../__w/calibre/calibre/manual/regexp.rst:70 msgid "is equivalent to ``[0-9]``" msgstr "``[0-9]`` と同等" #: ../../../__w/calibre/calibre/manual/regexp.rst:72 msgid "``\\w``" msgstr "``\\w``" #: ../../../__w/calibre/calibre/manual/regexp.rst:73 msgid "is equivalent to ``[a-zA-Z0-9_]``" msgstr "``[a-zA-Z0-9_]`` と同等" #: ../../../__w/calibre/calibre/manual/regexp.rst:76 msgid "``\\s``" msgstr "``\\s``" #: ../../../__w/calibre/calibre/manual/regexp.rst:77 msgid "is equivalent to any whitespace" msgstr "空白と同等" #: ../../../__w/calibre/calibre/manual/regexp.rst:80 msgid "" "\"Whitespace\" is a term for anything that won't be printed. These " "characters include space, tabulator, line feed, form feed, carriage return, " "non-breaking spaces, etc." msgstr "\"空白\" とは印刷されないものすべてを表す用語です。空白にはスペース、タブ文字、改行、改ページ、行頭復帰、ノーブレークスペースなどが含まれます。" #: ../../../__w/calibre/calibre/manual/regexp.rst:83 msgid "" "The upper and lower case sets may match both upper and lowercase if the " "setting to make searches case insensitive is enabled. Such settings are " "found, for instance in Preferences->Searching in calibre itself and on the " "Search panel in the calibre :guilabel:`E-book viewer` as well as the calibre" " :guilabel:`Edit book` tool." msgstr "検索で大文字と小文字を区別しない設定が有効になっていると、大文字と小文字のセットは大文字と小文字の両方にマッチします。そのような設定は、たとえば calibre 自身の 環境設定->検索 や calibre :guilabel:`電子書籍ビューア` の検索パネル、そして calibre :guilabel:`本の編集` ツールにあります。" #: ../../../__w/calibre/calibre/manual/regexp.rst:89 msgid "" "As a last note on sets, you can also define a set as any character *but* " "those in the set. You do that by including the character ``\"^\"`` as the " "*very first character in the set*. Thus, ``[^a]`` would match any character " "excluding \"a\". That's called complementing the set. Those escape sequence " "shorthands we saw earlier can also be complemented: ``\"\\D\"`` means any " "non-number character, thus being equivalent to ``[^0-9]``. The other " "shorthands can be complemented by, you guessed it, using the respective " "uppercase letter instead of the lowercase one. So, going back to the example" " ``
]*>`` from the previous section, now you can see that the character " "set it's using tries to match any character except for a closing angle " "bracket." msgstr "セットに関する最後の注意点として、セットはある文字を *除く* すべての文字と定義することが可能です。そのためには、文字 ``\"^\"`` をセットの *一番最初の文字として* 指定します。したがって ``[^a]`` は a 以外のどの文字ともマッチします。これをセットの補完と呼びます。前述したエスケープシーケンスでの略記法にも補完できます。``\"\\D\"`` は数字以外のどの文字にもマッチし、``[^0-9]`` と同等です。その他の略記法も、ご想像のとおり、それぞれ小文字の代わりに大文字を使うと補完になります。では、前の章で例として挙げた ``
]*>`` に戻ってみると、ここで使われている文字セットは山カッコを除く文字すべてにマッチさせようとしていることがわかります。"
#: ../../../__w/calibre/calibre/manual/regexp.rst:94
msgid ""
"But if I had a few varying strings I wanted to match, things get "
"complicated?"
msgstr "マッチさせたい文字列がいろいろあると、複雑になりますか?"
#: ../../../__w/calibre/calibre/manual/regexp.rst:96
msgid ""
"Fear not, life still is good and easy. Consider this example: The book "
"you're converting has \"Title\" written on every odd page and \"Author\" "
"written on every even page. Looks great in print, right? But in e-books, "
"it's annoying. You can group whole expressions in normal parentheses, and "
"the character ``\"|\"`` will let you match *either* the expression to its "
"right *or* the one to its left. Combine those and you're done. Too fast for "
"you? Okay, first off, we group the expressions for odd and even pages, thus "
"getting ``(Title)(Author)`` as our two needed expressions. Now we make "
"things simpler by using the vertical bar (``\"|\"`` is called the vertical "
"bar character): If you use the expression ``(Title|Author)`` you'll either "
"get a match for \"Title\" (on the odd pages) or you'd match \"Author\" (on "
"the even pages). Well, wasn't that easy?"
msgstr "心配いりません。まだまだ人生は楽勝です。次の例を考えてみましょう: 変換しようとしている本に、奇数ページごとに \"タイトル\" が、偶数ページごとに \"著者名\" が書かれているとします。印刷では見栄えがしますよね? しかし電子書籍では邪魔なだけです。表現全体を普通のカッコで囲むとグループ化できます。そして文字 ``\"|\"`` を使うと右側の表現 *または* 左側の表現の *いずれか* にマッチします。これをつなげれば、おしまいです。速すぎましたか? いいでしょう、まず最初に、奇数ページ用と偶数ページ用に表現をグループ化します。そうすると必要となる 2 つの表現として ``(タイトル)(著者名)`` が得られます。さて、これを縦線 (``\"|\"`` は縦線と呼ばれます) を使って簡単にします。正規表現 ``(タイトル|著者名)`` を使うと、\"タイトル\" (奇数ページ) または \"著者名\" (偶数ページ) のいずれかにマッチするようになります。ほら、簡単でしょう?"
#: ../../../__w/calibre/calibre/manual/regexp.rst:98
msgid ""
"You can, of course, use the vertical bar without using grouping parentheses,"
" as well. Remember when I said that quantifiers repeat the element preceding"
" them? Well, the vertical bar works a little differently: The expression "
"\"Title|Author\" will also match either the string \"Title\" or the string "
"\"Author\", just as the above example using grouping. *The vertical bar "
"selects between the entire expression preceding and following it*. So, if "
"you wanted to match the strings \"Calibre\" and \"calibre\" and wanted to "
"select only between the upper- and lowercase \"c\", you'd have to use the "
"expression ``(c|C)alibre``, where the grouping ensures that only the \"c\" "
"will be selected. If you were to use ``c|Calibre``, you'd get a match on the"
" string \"c\" or on the string \"Calibre\", which isn't what we wanted. In "
"short: If in doubt, use grouping together with the vertical bar."
msgstr "もちろん縦線をグループ化するカッコなしで使用することも可能です。ところで量指定子はその前の要素を繰り返すと説明したときのことを覚えていますか? 縦線の作用は少し異なります。正規表現 \"タイトル|著者名\" は、上でグループを使った例とまったく同じように、文字列 \"タイトル\" または文字列 \"著者名\" のいずれかに一致します。*縦線は、その前の表現全部と、その後ろの表現全部のうちから選択します*。したがって、もし文字列 \"Calibre\" と \"calibre\" にマッチさせたくて、大文字と小文字の 違いは\"c\" だけにしたい時は、使用する正規表現は ``(c|C)alibre`` としなくてはなりません。こうすると \"c\" だけが選択されることが保証されます。もし ``c|Calibre`` とすると、文字列 \"c\" または文字列 \"Calibre\" にマッチするため、望んだ結果となりません。要するに、よくわからないときには縦線を使う場合にはグループ化しましょう。"
#: ../../../__w/calibre/calibre/manual/regexp.rst:101
msgid "You missed..."
msgstr "見落としがあります..."
#: ../../../__w/calibre/calibre/manual/regexp.rst:103
msgid ""
"... wait just a minute, there's one last, really neat thing you can do with "
"groups. If you have a group that you previously matched, you can use "
"references to that group later in the expression: Groups are numbered "
"starting with 1, and you reference them by escaping the number of the group "
"you want to reference, thus, the fifth group would be referenced as ``\\5``."
" So, if you searched for ``([^ ]+) \\1`` in the string \"Test Test\", you'd "
"match the whole string!"
msgstr "…ちょっと待ってください。最後にひとつ、グループ化でできるすばらしいことがあります。前にマッチしたグループがあれば、そのグループをその正規表現の中で後で利用できるのです。グループには 1 から始まる番号がつけられ、参照したいグループの番号をエスケープすると参照できます。ですから 5 番目のグループを参照するには ``\\5`` とします。したがって文字列 \"Test Test\" に対して ``([^ ]+) \\1`` で検索すると、文字列全体にマッチします。"
#: ../../../__w/calibre/calibre/manual/regexp.rst:107
msgid ""
"In the beginning, you said there was a way to make a regular expression case"
" insensitive?"
msgstr "最初の方で、正規表現に大文字と小文字を区別させない方法があると言いましたよね?"
#: ../../../__w/calibre/calibre/manual/regexp.rst:109
msgid ""
"Yes, I did, thanks for paying attention and reminding me. You can tell "
"calibre how you want certain things handled by using something called flags."
" You include flags in your expression by using the special construct "
"``(?flags go here)`` where, obviously, you'd replace \"flags go here\" with "
"the specific flags you want. For ignoring case, the flag is ``i``, thus you "
"include ``(?i)`` in your expression. Thus, ``(?i)test`` would match "
"\"Test\", \"tEst\", \"TEst\" and any case variation you could think of."
msgstr "はい、そのとおりです。傾聴とご指摘をありがとうございます。フラグと呼ばれるものを使用すると、calibre にある物事をどのように処理して欲しいのか伝えることができます。フラグを正規表現に含めるには、特殊な構文 ``(?指定フラグ)`` を使用し、「指定フラグ」 の部分を指定したいフラグで置き換えます。大文字と小文字を区別しないようにするフラグは ``i`` なので、正規表現の中に ``(?i)`` を含めます。ですから `(?i)test`` は \"Test\", \"tEst\", \"TEst\" など思いつく限りすべてのバリエーションとマッチします。"
#: ../../../__w/calibre/calibre/manual/regexp.rst:111
msgid ""
"Another useful flag lets the dot match any character at all, *including* the"
" newline, the flag ``s``. If you want to use multiple flags in an "
"expression, just put them in the same statement: ``(?is)`` would ignore case"
" and make the dot match all. It doesn't matter which flag you state first, "
"``(?si)`` would be equivalent to the above."
msgstr "もうひとつの便利なフラグ ``s`` を使用すると、ドットを改行を *含めて* すべての文字にマッチさせることができます。正規表現の中で使用したいフラグが複数ある場合には、同じ記述の中に含めてかまいません。``(?is)`` とすると大文字と小文字を区別せず、ドットがすべての文字にマッチします。どちらのフラグを先に記述しても同じです。``(?si)`` は上のものと同等です。"
#: ../../../__w/calibre/calibre/manual/regexp.rst:114
msgid ""
"I think I'm beginning to understand these regular expressions now... how do "
"I use them in calibre?"
msgstr "だんだん正規表現がわかってきた気がします。calibre ではどう使いますか?"
#: ../../../__w/calibre/calibre/manual/regexp.rst:117
msgid "Conversions"
msgstr "変換"
#: ../../../__w/calibre/calibre/manual/regexp.rst:119
msgid ""
"Let's begin with the conversion settings, which is really neat. In the "
":guilabel:`Search & replace` part, you can input a regexp (short for regular"
" expression) that describes the string that will be replaced during the "
"conversion. The neat part is the wizard. Click on the wizard staff and you "
"get a preview of what calibre \"sees\" during the conversion process. Scroll"
" down to the string you want to remove, select and copy it, paste it into "
"the regexp field on top of the window. If there are variable parts, like "
"page numbers or so, use sets and quantifiers to cover those, and while "
"you're at it, remember to escape special characters, if there are some. Hit "
"the button labeled :guilabel:`Test` and calibre highlights the parts it "
"would replace were you to use the regexp. Once you're satisfied, hit OK and "
"convert. Be careful if your conversion source has tags like this example::"
msgstr "変換の設定から始めましょう。非常によくできています。:guilabel:`検索と置換` の部分に、変換中に置き換えたい文字列を記述する regexp (正規表現の略称) を入力できます。よくできている部分はウィザードです。ウィザードの杖ボタンをクリックすると、変換処理中に calibre に \"見える\" もののプレビューが表示されます。削除したい文字列のところまで下へスクロールして、選択してコピーし、ウィンドウの上部にある正規表現フィールドに貼り付けます。もしページ番号のような可変な部分があればセットと量指定子を使用して保護し、ついでに特殊文字があれば忘れずにエスケープします。:guilabel:`テスト` とラベルのついたボタンを押すと、calibre は正規表現で置換する部分をハイライト表示します。満足できたら OK を押して変換します。もし変換ソースに次の例のようなタグがある場合には、注意してください::"
#: ../../../__w/calibre/calibre/manual/regexp.rst:129
msgid ""
"(shamelessly ripped out of `this thread "
"