@@ -10,7 +10,7 @@ msgstr ""
10
10
"Report-Msgid-Bugs-To :\n "
11
11
"POT-Creation-Date :2018-06-20 13:46+0900\n "
12
12
"PO-Revision-Date :YEAR-MO-DA HO:MI+ZONE\n "
13
- "Last-Translator :tomo🐧 , 2018\n "
13
+ "Last-Translator :Arihiro TAKASE , 2018\n "
14
14
"Language-Team :Japanese (https://www.transifex.com/python-doc/teams/5390/ja/)\n "
15
15
"MIME-Version :1.0\n "
16
16
"Content-Type :text/plain; charset=UTF-8\n "
@@ -788,6 +788,9 @@ msgid ""
788
788
" a character range, ``\\ b`` represents the backspace character, for "
789
789
"compatibility with Python's string literals."
790
790
msgstr ""
791
+ "デフォルトの Unicode 英数字は Unicode パターン中で使われるものと同じですが、これは :const:`ASCII` "
792
+ "フラグを使って変更できます。 :const:`LOCALE` フラグが使われているなら単語の境界は現在のロケールによって決定されます。Python "
793
+ "の文字列リテラルとの互換性のため、文字列範囲中では、 ``\\ b`` は後退 (backspace) 文字を表します。"
791
794
792
795
#: ../../library/re.rst:380
793
796
msgid "``\\ B``"
@@ -803,6 +806,11 @@ msgid ""
803
806
":const:`ASCII` flag. Word boundaries are determined by the current locale "
804
807
"if the :const:`LOCALE` flag is used."
805
808
msgstr ""
809
+ "空文字列にマッチしますが、それが単語の先頭か末尾 *でない* ときのみです。つまり ``r'py\\ B'`` は ``'python'`` 、 "
810
+ "``'py3'`` 、``'py2'`` にマッチしますが、 ``'py'`` 、 ``'py.'`` 、 または ``'py!'`` "
811
+ "にはマッチしません。 ``\\ B`` は ``\\ b`` のちょうど反対で、 Unicode パターンにおける単語文字は Unicode "
812
+ "英数字およびアンダースコアですが、 これは :const:`ASCII` フラグを使って変更できます。 :const:`LOCALE` "
813
+ "フラグが使われているなら単語の境界は現在のロケールによって決定されます。"
806
814
807
815
#: ../../library/re.rst:392
808
816
msgid "``\\ d``"
@@ -1079,6 +1087,10 @@ msgid ""
1079
1087
"unless the :const:`re.LOCALE` flag is also used. Corresponds to the inline "
1080
1088
"flag ``(?i)``."
1081
1089
msgstr ""
1090
+ "大文字・小文字を区別しないマッチングを実行させます。 ``[A-Z]`` のような表現は小文字にもマッチします。 :const:`re.ASCII` "
1091
+ "フラグが使われて非 ASCII マッチが無効化されていない限り、完全な Unicode マッチング (例えば ``Ü`` が ``ü`` にマッチする)"
1092
+ " も有効です。 :const:`re.LOCALE` フラグが共に使われていない限り、現在のロケールは変更されません。インラインフラグの "
1093
+ "``(?i)`` に相当します。"
1082
1094
1083
1095
#: ../../library/re.rst:552
1084
1096
msgid ""
@@ -1102,6 +1114,10 @@ msgid ""
1102
1114
" Python 3 for Unicode (str) patterns, and it is able to handle different "
1103
1115
"locales/languages. Corresponds to the inline flag ``(?L)``."
1104
1116
msgstr ""
1117
+ "``\\ w`` 、 ``\\ W`` 、 ``\\ b`` 、 ``\\ B`` "
1118
+ "および大文字・小文字を区別しないマッチングを、現在のロケールに依存させます。ロケールの仕組みは信頼できず、一度に一つの\" 文化\" しか扱えず、 8 "
1119
+ "ビットロケールでしか働かないので、このフラグを使うことは推奨されません。Python 3 において Unicode (str) パターンでは "
1120
+ "Unicode マッチングはデフォルトですでに有効にされていて、異なるロケールや言語を扱えます。インラインフラグの ``(?L)`` に相当します。"
1105
1121
1106
1122
#: ../../library/re.rst:574
1107
1123
msgid ""
@@ -1143,6 +1159,10 @@ msgid ""
1143
1159
"backslash, all characters from the leftmost such ``#`` through the end of "
1144
1160
"the line are ignored."
1145
1161
msgstr ""
1162
+ "このフラグは正規表現を、パターンの論理的な節を視覚的に分割し、コメントを加えることで、見た目よく読みやすく書けるようにします。パターン中の空白は、文字クラス中にあるときと、エスケープされていないバックスラッシュの後にあるときと、"
1163
+ " ``*?`` 、 ``(?:`` や ``(?P<...>`` "
1164
+ "のようなトークン中を除いて無視されます。ある行が文字クラス中でもエスケープされていないバックスラッシュの後でもない ``#`` "
1165
+ "を含むなら、一番左のそのような ``#`` から行末までの全ての文字は無視されます。"
1146
1166
1147
1167
#: ../../library/re.rst:611
1148
1168
msgid ""
@@ -1222,6 +1242,7 @@ msgid ""
1222
1242
"of the string, the result will start with an empty string. The same holds "
1223
1243
"for the end of the string::"
1224
1244
msgstr ""
1245
+ "セパレータ中にキャプチャグループがあり、それが文字列の先頭にマッチするなら、結果は空文字列で始まります。同じことが文字列の末尾にも言えます。"
1225
1246
1226
1247
#: ../../library/re.rst:679
1227
1248
msgid ""
@@ -1277,6 +1298,9 @@ msgid ""
1277
1298
"a list of groups; this will be a list of tuples if the pattern has more than"
1278
1299
" one group. Empty matches are included in the result."
1279
1300
msgstr ""
1301
+ "*string* 中の *pattern* による全ての重複しないマッチを、文字列のリストとして返します。 *string* "
1302
+ "は左から右へ走査され、マッチは見つかった順で返されます。パターン中に 1 "
1303
+ "つ以上のグループがあれば、グループのリストを返します。パターンに複数のグループがあればタプルのリストになります。空マッチは結果に含まれます。"
1280
1304
1281
1305
#: ../../library/re.rst:725
1282
1306
msgid ""
@@ -1306,6 +1330,11 @@ msgid ""
1306
1330
"such as ``\\ &`` are left alone. Backreferences, such as ``\\ 6``, are "
1307
1331
"replaced with the substring matched by group 6 in the pattern. For example::"
1308
1332
msgstr ""
1333
+ "*string* 中に出現する一番左の重複しない *pattern* を置換 *repl* "
1334
+ "で置換することで得られる文字列を返します。パターンが見つからなければ、 *string* がそのまま返されます。 *repl* "
1335
+ "は文字列または関数です。それが文字列なら、その中の全てのバックスラッシュエスケープが処理されます。 ``\\ n`` は 1 つの改行文字に変換され、 "
1336
+ "``\\ r`` はキャリッジリターンに変換される、などです。 ``\\ &`` のような未知のエスケープは残されます。後方参照は、例えば ``\\ 6`` "
1337
+ "は、グループ 6 がパターン中でマッチした部分文字列で置換されます。例えば::"
1309
1338
1310
1339
#: ../../library/re.rst:755
1311
1340
msgid ""
@@ -1388,6 +1417,8 @@ msgid ""
1388
1417
"This functions must not be used for the replacement string in :func:`sub` "
1389
1418
"and :func:`subn`, only backslashes should be escaped. For example::"
1390
1419
msgstr ""
1420
+ "この関数は、バックスラッシュのみをエスケープするべき :func:`sub` および :func:`subn` "
1421
+ "における置換文字列に使われてはなりません。例えば::"
1391
1422
1392
1423
#: ../../library/re.rst:837
1393
1424
msgid "The ``'_'`` character is no longer escaped."
@@ -1621,6 +1652,12 @@ msgid ""
1621
1652
" the corresponding result is ``None``. If a group is contained in a part of "
1622
1653
"the pattern that matched multiple times, the last match is returned. ::"
1623
1654
msgstr ""
1655
+ "このマッチの 1 つ以上のサブグループを返します。引数が 1 つなら結果は 1 つの文字列です。複数の引数があれば、結果は引数ごとに 1 "
1656
+ "項目のタプルです。引数がなければ、 *group1* はデフォルトで 0 (マッチ全体が返される) です。 *groupN* 引数が 0 "
1657
+ "なら、対応する返り値はマッチした文字列全体です。1 以上 99 "
1658
+ "以下なら、丸括弧による対応するグループにマッチする文字列です。グループ番号が負であるかパターン中で定義されたグループの数より大きければ、 "
1659
+ ":exc:`IndexError` 例外が送出されます。あるグループがパターンのマッチしなかった部分に含まれているなら、対応する結果は ``None``"
1660
+ " です。あるグループがパターンの複数回マッチした部分に含まれているなら、最後のマッチが返されます。 ::"
1624
1661
1625
1662
#: ../../library/re.rst:1055
1626
1663
msgid ""
@@ -1635,21 +1672,21 @@ msgstr ""
1635
1672
1636
1673
#: ../../library/re.rst:1060
1637
1674
msgid "A moderately complicated example::"
1638
- msgstr ""
1675
+ msgstr "やや複雑な例:: "
1639
1676
1640
1677
#: ../../library/re.rst:1068
1641
1678
msgid "Named groups can also be referred to by their index::"
1642
- msgstr ""
1679
+ msgstr "名前付きグループはインデックスでも参照できます:: "
1643
1680
1644
1681
#: ../../library/re.rst:1075
1645
1682
msgid "If a group matches multiple times, only the last match is accessible::"
1646
- msgstr ""
1683
+ msgstr "あるグループが複数回マッチすると、その最後のマッチにのみアクセスできます:: "
1647
1684
1648
1685
#: ../../library/re.rst:1084
1649
1686
msgid ""
1650
1687
"This is identical to ``m.group(g)``. This allows easier access to an "
1651
1688
"individual group from a match::"
1652
- msgstr ""
1689
+ msgstr "これは ``m.group(g)`` と同等です。これでマッチの個別のグループに簡単にアクセスできます:: "
1653
1690
1654
1691
#: ../../library/re.rst:1100
1655
1692
msgid ""
@@ -1670,13 +1707,17 @@ msgid ""
1670
1707
"groups might participate in the match. These groups will default to "
1671
1708
"``None`` unless the *default* argument is given::"
1672
1709
msgstr ""
1710
+ "少数位およびその後の全てをオプションにすると、全てのグループがマッチに関係するとは限りません。そういったグループは *default* "
1711
+ "引数が与えられない限りデフォルトで ``None`` になります。"
1673
1712
1674
1713
#: ../../library/re.rst:1123
1675
1714
msgid ""
1676
1715
"Return a dictionary containing all the *named* subgroups of the match, keyed"
1677
1716
" by the subgroup name. The *default* argument is used for groups that did "
1678
1717
"not participate in the match; it defaults to ``None``. For example::"
1679
1718
msgstr ""
1719
+ "このマッチの、全ての *名前付き* サブグループを含む、サブグループ名をキーとする辞書を返します。 *default* "
1720
+ "引数はマッチに関係しなかったグループに使われます。デフォルトは ``None`` です。例えば::"
1680
1721
1681
1722
#: ../../library/re.rst:1135
1682
1723
msgid ""
@@ -1705,7 +1746,7 @@ msgstr ""
1705
1746
1706
1747
#: ../../library/re.rst:1148
1707
1748
msgid "An example that will remove *remove_this* from email addresses::"
1708
- msgstr ""
1749
+ msgstr "メールアドレスから *remove_this* を取り除く例:: "
1709
1750
1710
1751
#: ../../library/re.rst:1158
1711
1752
msgid ""
@@ -1792,14 +1833,16 @@ msgstr ""
1792
1833
1793
1834
#: ../../library/re.rst:1227
1794
1835
msgid "To see if a given string is a valid hand, one could do the following::"
1795
- msgstr ""
1836
+ msgstr "与えられた文字列が有効な手札であるか見るには、以下のようにできます:: "
1796
1837
1797
1838
#: ../../library/re.rst:1237
1798
1839
msgid ""
1799
1840
"That last hand, ``\" 727ak\" ``, contained a pair, or two of the same valued "
1800
1841
"cards. To match this with a regular expression, one could use backreferences"
1801
1842
" as such::"
1802
1843
msgstr ""
1844
+ "最後の手札、 ``\" 727ak\" `` 、はペア、すなわち同じ値の 2 "
1845
+ "枚のカードを含みます。正規表現でこれにマッチするには、このように後方参照を使えます::"
1803
1846
1804
1847
#: ../../library/re.rst:1247
1805
1848
msgid ""
@@ -1939,6 +1982,8 @@ msgid ""
1939
1982
"expression beginning with ``'^'`` will match at the beginning of each line. "
1940
1983
"::"
1941
1984
msgstr ""
1985
+ "ただし、 :const:`MULTILINE` モードにおいて :func:`match` は文字列の先頭でのみマッチし、 ``'^'`` "
1986
+ "で始まる正規表現で :func:`search` を使うと各行の先頭でマッチすることに注意してください。"
1942
1987
1943
1988
#: ../../library/re.rst:1348
1944
1989
msgid "Making a Phonebook"
@@ -1959,7 +2004,7 @@ msgstr ""
1959
2004
msgid ""
1960
2005
"First, here is the input. Normally it may come from a file, here we are "
1961
2006
"using triple-quoted string syntax::"
1962
- msgstr ""
2007
+ msgstr "まず、ここに入力があります。普通はファイルから持ってくることもありますが、ここでは三重クオート文字列構文を使います:: "
1963
2008
1964
2009
#: ../../library/re.rst:1366
1965
2010
msgid ""
@@ -2010,6 +2055,8 @@ msgid ""
2010
2055
"the adverbs in some text, they might use :func:`findall` in the following "
2011
2056
"manner::"
2012
2057
msgstr ""
2058
+ ":func:`search` は最初のパターンにのみマッチしますが、 :func:`findall` は出現する *全ての* "
2059
+ "パターンにマッチします。例えば、ライターがあるテキストの全ての副詞を見つけたいなら、以下のように :func:`findall` を使えます::"
2013
2060
2014
2061
#: ../../library/re.rst:1439
2015
2062
msgid "Finding all Adverbs and their Positions"
@@ -2023,6 +2070,9 @@ msgid ""
2023
2070
"if a writer wanted to find all of the adverbs *and their positions* in some "
2024
2071
"text, they would use :func:`finditer` in the following manner::"
2025
2072
msgstr ""
2073
+ "パターンの全てのマッチについて、マッチしたテキスト以上の情報が必要なら、文字列ではなく :ref:`マッチオブジェクト <match-objects>`"
2074
+ " を返す :func:`finditer` が便利です。先の例に続いて、ライターがあるテキストの全ての副詞 *およびその位置* "
2075
+ "を見つけたいなら、以下のように :func:`finditer` を使えます::"
2026
2076
2027
2077
#: ../../library/re.rst:1455
2028
2078
msgid "Raw String Notation"
@@ -2079,3 +2129,5 @@ msgid ""
2079
2129
"first edition covered writing good regular expression patterns in great "
2080
2130
"detail."
2081
2131
msgstr ""
2132
+ "Friedl, Jeffrey. Mastering Regular Expressions. 3rd ed., O'Reilly Media, "
2133
+ "2009. 当書の第三版ではもはや Python についてまったく取り扱っていませんが、初版では良い正規表現を書くことを綿密に取り扱っていました。"