@@ -1074,6 +1074,8 @@ msgid ""
1074
1074
"Make ``\\ w``, ``\\ W``, ``\\ b``, ``\\ B`` and case-insensitive matching "
1075
1075
"dependent on the current locale instead of the Unicode database."
1076
1076
msgstr ""
1077
+ "``\\ w``, ``\\ W``, ``\\ b``, ``\\ B`` と小文字大文字の区別を無視したマッチングを、 Unicode "
1078
+ "データベースではなく現在のロケールに従って行います。"
1077
1079
1078
1080
#: ../../howto/regex.rst:583
1079
1081
msgid ""
@@ -1248,7 +1250,7 @@ msgstr "例えば、行の先頭の ``From`` にのみマッチさせたい場
1248
1250
1249
1251
#: ../../howto/regex.rst:718
1250
1252
msgid "To match a literal ``'^'``, use ``\\ ^``."
1251
- msgstr ""
1253
+ msgstr "リテラル ``'^'`` にマッチするには `` \\ ^`` を利用してください。 "
1252
1254
1253
1255
#: ../../howto/regex.rst:732
1254
1256
msgid "``$``"
@@ -1356,6 +1358,8 @@ msgid ""
1356
1358
" of interest. For example, an RFC-822 header line is divided into a header "
1357
1359
"name and a value, separated by a ``':'``, like this:"
1358
1360
msgstr ""
1361
+ "正規表現にマッチするかどうかだけでなく、より多くの情報を得なければいけない場合は多々あります。正規表現はしばしば、正規表現をいくつかのサブグループに分けて興味ある部分にマッチするようにして、文字列を分割するのに使われます。例えば、RFC-822"
1362
+ " ヘッダ行は ``':'`` を挟んでこのようにヘッダ名と値に分割されます:"
1359
1363
1360
1364
#: ../../howto/regex.rst:799
1361
1365
msgid ""
@@ -1389,6 +1393,11 @@ msgid ""
1389
1393
"default argument. Later we'll see how to express groups that don't capture "
1390
1394
"the span of text that they match. ::"
1391
1395
msgstr ""
1396
+ "``'('``, ``')'`` で指示されたグループは、マッチしたテキスト開始と終了位置もキャプチャします; "
1397
+ ":meth:`~re.Match.group`, :meth:`~re.Match.start`, :meth:`~re.Match.end`, "
1398
+ ":meth:`~re.Match.span` に引数を与えて取り出せます。グループはゼロ始まりの数値です。グループ 0 は常に使えます; それは RE "
1399
+ "でマッチした全体で、 :ref:`Match オブジェクト <match-objects>` メソッドの全てはグループ 0 "
1400
+ "をデフォルト引数にしています。マッチするテキストの範囲をキャプチャしないグループの書き方はのちほど見ることにします。 ::"
1392
1401
1393
1402
#: ../../howto/regex.rst:830
1394
1403
msgid ""
@@ -1404,12 +1413,14 @@ msgid ""
1404
1413
"which case it will return a tuple containing the corresponding values for "
1405
1414
"those groups. ::"
1406
1415
msgstr ""
1416
+ ":meth:`~re.Match.group` "
1417
+ "には一回に複数の引数を渡してもかまいません、その場合にはそれらのグループに対応する値を含むタプルを返します。 ::"
1407
1418
1408
1419
#: ../../howto/regex.rst:849
1409
1420
msgid ""
1410
1421
"The :meth:`~re.Match.groups` method returns a tuple containing the strings "
1411
1422
"for all the subgroups, from 1 up to however many there are. ::"
1412
- msgstr ""
1423
+ msgstr ":meth:`~re.Match.groups` メソッドは 1 から全てのサブグループの文字列を含むタプルを返します。:: "
1413
1424
1414
1425
#: ../../howto/regex.rst:855
1415
1426
msgid ""
@@ -1574,6 +1585,10 @@ msgid ""
1574
1585
"words, ``\\ b(\\ w+)\\ s+\\ 1\\ b`` can also be written as "
1575
1586
"``\\ b(?P<word>\\ w+)\\ s+(?P=word)\\ b``::"
1576
1587
msgstr ""
1588
+ "後方参照のための構文 ``(...)\\ 1`` はグループ番号への参照となっています。\n"
1589
+ "グループ番号の代わりに、グループ名を利用する変種があるのは当然でしょう。\n"
1590
+ "これはもう一つの Python 拡張です: ``(?P=name)`` は、 *name* という名前のグループの内容が、現在の位置で再びマッチすることを示しています。\n"
1591
+ "同じ単語が2つ連なっているのを見つける正規表現 ``\\ b(\\ w+)\\ s+\\ 1\\ b`` は ``\\ b(?P<word>\\ w+)\\ s+(?P=word)\\ b`` のように書けます::"
1577
1592
1578
1593
#: ../../howto/regex.rst:972
1579
1594
msgid "Lookahead Assertions"
@@ -1768,7 +1783,7 @@ msgstr "``subn()``"
1768
1783
msgid ""
1769
1784
"Does the same thing as :meth:`!sub`, but returns the new string and the "
1770
1785
"number of replacements"
1771
- msgstr ""
1786
+ msgstr ":meth:`!sub` と同じことをしますが、新しい文字列と置き換えの回数を返します "
1772
1787
1773
1788
#: ../../howto/regex.rst:1072
1774
1789
msgid "Splitting Strings"
@@ -1783,6 +1798,9 @@ msgid ""
1783
1798
"splitting by whitespace or by a fixed string. As you'd expect, there's a "
1784
1799
"module-level :func:`re.split` function, too."
1785
1800
msgstr ""
1801
+ ":meth:`~re.Match.split` メソッドは文字列を正規表現にマッチした場所で分割し、リストで返却します。文字列の "
1802
+ ":meth:`~str.split` メソッドに似てはいますが、もっとずっと一般化したデリミタで分割出来ます; 文字列の :meth:`!split` "
1803
+ "メソッドは単に空白文字か固定文字列で分割出来るだけです。ご想像通り、モジュールレベルの :func:`re.split` 関数もあります。"
1786
1804
1787
1805
#: ../../howto/regex.rst:1085
1788
1806
msgid ""
0 commit comments