-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathregex.po
2538 lines (2252 loc) · 128 KB
/
regex.po
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2022, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# Rafael Fontenelle <[email protected]>, 2022
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.10\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-12-30 14:59+0000\n"
"PO-Revision-Date: 2022-11-05 17:21+0000\n"
"Last-Translator: Rafael Fontenelle <[email protected]>, 2022\n"
"Language-Team: Japanese (https://www.transifex.com/python-doc/teams/5390/"
"ja/)\n"
"Language: ja\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: ../../howto/regex.rst:5
msgid "Regular Expression HOWTO"
msgstr "正規表現 HOWTO"
#: ../../howto/regex.rst:0
msgid "Author"
msgstr "著者"
#: ../../howto/regex.rst:7
msgid "A.M. Kuchling <[email protected]>"
msgstr "A.M. Kuchling <[email protected]>"
#: ../../howto/regex.rstNone
msgid "Abstract"
msgstr "概要"
#: ../../howto/regex.rst:18
msgid ""
"This document is an introductory tutorial to using regular expressions in "
"Python with the :mod:`re` module. It provides a gentler introduction than "
"the corresponding section in the Library Reference."
msgstr ""
"このドキュメントは :mod:`re` モジュールを使って Python で正規表現を扱うための"
"導入のチュートリアルです。ライブラリレファレンスの正規表現の節よりもやさしい"
"入門ドキュメントを用意しています。"
#: ../../howto/regex.rst:24
msgid "Introduction"
msgstr "はじめに"
#: ../../howto/regex.rst:26
msgid ""
"Regular expressions (called REs, or regexes, or regex patterns) are "
"essentially a tiny, highly specialized programming language embedded inside "
"Python and made available through the :mod:`re` module. Using this little "
"language, you specify the rules for the set of possible strings that you "
"want to match; this set might contain English sentences, or e-mail "
"addresses, or TeX commands, or anything you like. You can then ask "
"questions such as \"Does this string match the pattern?\", or \"Is there a "
"match for the pattern anywhere in this string?\". You can also use REs to "
"modify a string or to split it apart in various ways."
msgstr ""
"正規表現 regular expressions (REs や regexes または regex patterns と呼ばれま"
"す) は本質的に小さく、Python 内部に埋め込まれた高度に特化したプログラミング言"
"語で :mod:`re` モジュールから利用可能です。この小さな言語を利用することで、"
"マッチさせたい文字列に適合するような文字列の集合を指定することができます; こ"
"の集合は英文や e-mail アドレスや TeX コマンドなど、どんなものでも構いません。"
"「この文字列は指定したパターンにマッチしますか?」「このパターンはこの文字列の"
"どの部分にマッチするのですか?」といったことを問い合わせることができます。正規"
"表現を使って文字列を変更したりいろいろな方法で別々の部分に分割したりすること"
"もできます。"
#: ../../howto/regex.rst:35
msgid ""
"Regular expression patterns are compiled into a series of bytecodes which "
"are then executed by a matching engine written in C. For advanced use, it "
"may be necessary to pay careful attention to how the engine will execute a "
"given RE, and write the RE in a certain way in order to produce bytecode "
"that runs faster. Optimization isn't covered in this document, because it "
"requires that you have a good understanding of the matching engine's "
"internals."
msgstr ""
"正規表現パターンは一連のバイトコードとしてコンパイルされ、C で書かれたマッチ"
"ングエンジンによって実行されます。より進んだ利用法では、エンジンがどう与えら"
"れた正規表現を実行するかに注意することが必要になり、高速に実行できるバイト"
"コードを生成するように正規表現を書くことになります。このドキュメントでは最適"
"化までは扱いません、それにはマッチングエンジンの内部に対する十分な理解が必要"
"だからです。"
#: ../../howto/regex.rst:42
msgid ""
"The regular expression language is relatively small and restricted, so not "
"all possible string processing tasks can be done using regular expressions. "
"There are also tasks that *can* be done with regular expressions, but the "
"expressions turn out to be very complicated. In these cases, you may be "
"better off writing Python code to do the processing; while Python code will "
"be slower than an elaborate regular expression, it will also probably be "
"more understandable."
msgstr ""
"正規表現言語は相対的に小さく、制限されています、そのため正規表現を使ってあら"
"ゆる文字列処理作業を行なえるわけではありません。正規表現を使って行うことので"
"きる作業もあります、ただ表現はとても複雑なものになります。それらの場合では、"
"Python コードを書いた方がいいでしょう; Python コードは念入りに作られた正規表"
"現より遅くなりますが、おそらくより読み易いでしょう。"
#: ../../howto/regex.rst:51
msgid "Simple Patterns"
msgstr "単純なパターン"
#: ../../howto/regex.rst:53
msgid ""
"We'll start by learning about the simplest possible regular expressions. "
"Since regular expressions are used to operate on strings, we'll begin with "
"the most common task: matching characters."
msgstr ""
"まずはできるだけ簡単な正規表現を学ぶことから始めてみましょう。正規表現は文字"
"列の操作に使われるので、ますは最も一般的な作業である文字のマッチングをしてみ"
"ます。"
#: ../../howto/regex.rst:57
msgid ""
"For a detailed explanation of the computer science underlying regular "
"expressions (deterministic and non-deterministic finite automata), you can "
"refer to almost any textbook on writing compilers."
msgstr ""
"正規表現の基礎を成す計算機科学 (決定、非決定有限オートマトン) の詳細な説明に"
"ついては, コンパイラ作成に関するテキストブックをどれでもいいので参照して下さ"
"い。"
#: ../../howto/regex.rst:63
msgid "Matching Characters"
msgstr "文字のマッチング"
#: ../../howto/regex.rst:65
msgid ""
"Most letters and characters will simply match themselves. For example, the "
"regular expression ``test`` will match the string ``test`` exactly. (You "
"can enable a case-insensitive mode that would let this RE match ``Test`` or "
"``TEST`` as well; more about this later.)"
msgstr ""
"多くの活字や文字は単純にそれ自身とマッチします。例えば、 ``test`` という正規"
"表現は文字列 ``test`` に厳密にマッチします。(大文字小文字を区別しないモードで"
"その正規表現が ``Test`` や ``TEST`` にも同様にマッチすることもできます; 詳し"
"くは後述します。)"
#: ../../howto/regex.rst:70
msgid ""
"There are exceptions to this rule; some characters are special :dfn:"
"`metacharacters`, and don't match themselves. Instead, they signal that "
"some out-of-the-ordinary thing should be matched, or they affect other "
"portions of the RE by repeating them or changing their meaning. Much of "
"this document is devoted to discussing various metacharacters and what they "
"do."
msgstr ""
"この規則には例外が存在します; いくつかの文字は特別な :dfn:`特殊文字 "
"(metacharacters)` で、それら自身にマッチしません。代わりに通常のマッチするも"
"のとは違うという合図を出したり、正規表現の一部に対して繰り返したり、意味を変"
"えたりして影響を与えます。このドキュメントの中の多くは様々な特殊文字とそれが"
"何をするかについて論じることになります。"
#: ../../howto/regex.rst:76
msgid ""
"Here's a complete list of the metacharacters; their meanings will be "
"discussed in the rest of this HOWTO."
msgstr ""
"ここに特殊文字の完全な一覧があります; これらの意味はこの HOWTO の残りの部分で"
"説明します。"
#: ../../howto/regex.rst:83
msgid ""
"The first metacharacters we'll look at are ``[`` and ``]``. They're used for "
"specifying a character class, which is a set of characters that you wish to "
"match. Characters can be listed individually, or a range of characters can "
"be indicated by giving two characters and separating them by a ``'-'``. For "
"example, ``[abc]`` will match any of the characters ``a``, ``b``, or ``c``; "
"this is the same as ``[a-c]``, which uses a range to express the same set of "
"characters. If you wanted to match only lowercase letters, your RE would be "
"``[a-z]``."
msgstr ""
"最初に扱う特殊文字は ``[`` と ``]`` です。これらは文字クラスを指定します、文"
"字クラスはマッチしたい文字の集合です。文字は個別にリストにしても構いません"
"し、二つの文字を ``'-'`` でつなげて文字を範囲で与えてもかまいません。たとえ"
"ば ``[abc]`` は ``a``, ``b``, または ``c`` のどの文字列にもマッチします; これ"
"は ``[a-c]`` で同じ文字集合を範囲で表現しても全く同じです。小文字のアルファ"
"ベットのみにマッチしたい場合、 ``[a-z]`` の正規表現をつかうことになるでしょ"
"う。"
#: ../../howto/regex.rst:92
msgid ""
"Metacharacters (except ``\\``) are not active inside classes. For example, "
"``[akm$]`` will match any of the characters ``'a'``, ``'k'``, ``'m'``, or "
"``'$'``; ``'$'`` is usually a metacharacter, but inside a character class "
"it's stripped of its special nature."
msgstr ""
"(``\\`` を除く) 特殊文字は文字クラスの内部では有効になりません。例えば、 "
"``[akm$]`` は ``'a'``, ``'k'``, ``'m'``, または ``'{TX-PL-LABEL}#x27;`` のい"
"ずれかにマッチします; ``'{TX-PL-LABEL}#x27;`` は通常は特殊文字ですが、文字ク"
"ラス内部ではその特別な性質は取り除かれます。"
#: ../../howto/regex.rst:97
msgid ""
"You can match the characters not listed within the class by :dfn:"
"`complementing` the set. This is indicated by including a ``'^'`` as the "
"first character of the class. For example, ``[^5]`` will match any character "
"except ``'5'``. If the caret appears elsewhere in a character class, it "
"does not have special meaning. For example: ``[5^]`` will match either a "
"``'5'`` or a ``'^'``."
msgstr ""
":dfn:`補集合を取る` ことで、文字クラス内のリストにない文字に対してマッチさせ"
"られます。\n"
"補集合は、クラスの最初の文字として ``'^'`` を含めることで表せます。\n"
"例えば、 ``[^5]`` は ``'5'`` 以外の文字にマッチします。\n"
"キャレットが文字クラス以外の場所に現れた場合は、特別な意味は持ちません。\n"
"例えば、 ``[5^]`` は ``'5'`` や ``'^'`` にマッチします。"
#: ../../howto/regex.rst:103
msgid ""
"Perhaps the most important metacharacter is the backslash, ``\\``. As in "
"Python string literals, the backslash can be followed by various characters "
"to signal various special sequences. It's also used to escape all the "
"metacharacters so you can still match them in patterns; for example, if you "
"need to match a ``[`` or ``\\``, you can precede them with a backslash to "
"remove their special meaning: ``\\[`` or ``\\\\``."
msgstr ""
"おそらく最も重要な特殊文字はバックスラッシュ ``\\`` でしょう。 Python の文字"
"列リテラルのようにバックスラッシュに続けていろいろな文字を入力することでいろ"
"いろな特殊シーケンスの合図を送ることができます。また、バックスラッシュはすべ"
"ての特殊文字をエスケープするのにも利用されます、つまり、特殊文字をマッチさせ"
"ることができます; 例えば、 ``[`` または ``\\`` にマッチさせたい場合、それらを"
"バックスラッシュに続けることで特殊な意味を除きます: ``\\[`` または ``\\"
"\\`` 。"
#: ../../howto/regex.rst:110
msgid ""
"Some of the special sequences beginning with ``'\\'`` represent predefined "
"sets of characters that are often useful, such as the set of digits, the set "
"of letters, or the set of anything that isn't whitespace."
msgstr ""
"``'\\'`` で始まるいくつかの特殊シーケンスは、数字、アルファベット、空白文字以"
"外など、よく使う文字集合を表しています。"
#: ../../howto/regex.rst:115
msgid ""
"Let's take an example: ``\\w`` matches any alphanumeric character. If the "
"regex pattern is expressed in bytes, this is equivalent to the class ``[a-zA-"
"Z0-9_]``. If the regex pattern is a string, ``\\w`` will match all the "
"characters marked as letters in the Unicode database provided by the :mod:"
"`unicodedata` module. You can use the more restricted definition of ``\\w`` "
"in a string pattern by supplying the :const:`re.ASCII` flag when compiling "
"the regular expression."
msgstr ""
"一つ例をお見せしましょう: ``\\w`` は任意の英数字文字にマッチします。バイト列"
"パターンに対しては、これは文字クラス ``[a-zA-Z0-9_]`` と等価です。ユニコード"
"パターンに対しては、 ``\\w`` は :mod:`unicodedata` モジュールで提供されてい"
"る Unicode データベースで letters としてマークされている全ての文字とマッチし"
"ます。正規表現のコンパイル時に :const:`re.ASCII` フラグを与えることにより、 "
"``\\w`` を、より制限された定義で使うことが出来ます。"
#: ../../howto/regex.rst:123
msgid ""
"The following list of special sequences isn't complete. For a complete list "
"of sequences and expanded class definitions for Unicode string patterns, see "
"the last part of :ref:`Regular Expression Syntax <re-syntax>` in the "
"Standard Library reference. In general, the Unicode versions match any "
"character that's in the appropriate category in the Unicode database."
msgstr ""
"以下に続く特別な文字列のリストは完全ではありません。特殊シーケンスと拡張クラ"
"スについてのユニコードパターンの定義についての完全なリストは、標準ライブラリ"
"リファレンスの :ref:`正規表現の構文 <re-syntax>` の最後のパートを参照してくだ"
"さい。一般的にユニコードバージョンは、ユニコードデータベース内で相応しいカテ"
"ゴリに属すればマッチします。"
#: ../../howto/regex.rst:131
msgid "``\\d``"
msgstr "``\\d``"
#: ../../howto/regex.rst:131
msgid "Matches any decimal digit; this is equivalent to the class ``[0-9]``."
msgstr "任意の十進数とマッチします; これは集合 ``[0-9]`` と同じ意味です。"
#: ../../howto/regex.rst:134
msgid "``\\D``"
msgstr "``\\D``"
#: ../../howto/regex.rst:134
msgid ""
"Matches any non-digit character; this is equivalent to the class ``[^0-9]``."
msgstr "任意の非数字文字とマッチします; これは集合 ``[^0-9]`` と同じ意味です。"
#: ../../howto/regex.rst:138
msgid "``\\s``"
msgstr "``\\s``"
#: ../../howto/regex.rst:137
msgid ""
"Matches any whitespace character; this is equivalent to the class "
"``[ \\t\\n\\r\\f\\v]``."
msgstr ""
"任意の空白文字とマッチします; これは集合 ``[ \\t\\n\\r\\f\\v]`` と同じ意味で"
"す。"
#: ../../howto/regex.rst:142
msgid "``\\S``"
msgstr "``\\S``"
#: ../../howto/regex.rst:141
msgid ""
"Matches any non-whitespace character; this is equivalent to the class ``[^ "
"\\t\\n\\r\\f\\v]``."
msgstr ""
"任意の非空白文字とマッチします; これは集合 ``[^ \\t\\n\\r\\f\\v]`` と同じ意味"
"です。"
#: ../../howto/regex.rst:146
msgid "``\\w``"
msgstr "``\\w``"
#: ../../howto/regex.rst:145
msgid ""
"Matches any alphanumeric character; this is equivalent to the class ``[a-zA-"
"Z0-9_]``."
msgstr ""
"任意の英数文字および下線とマッチします; これは、集合 ``[a-zA-Z0-9_]`` と同じ"
"意味です。"
#: ../../howto/regex.rst:150
msgid "``\\W``"
msgstr "``\\W``"
#: ../../howto/regex.rst:149
msgid ""
"Matches any non-alphanumeric character; this is equivalent to the class "
"``[^a-zA-Z0-9_]``."
msgstr ""
"任意の非英数文字とマッチします; これは集合 ``[^a-zA-Z0-9_]`` と同じ意味です。"
#: ../../howto/regex.rst:152
msgid ""
"These sequences can be included inside a character class. For example, "
"``[\\s,.]`` is a character class that will match any whitespace character, "
"or ``','`` or ``'.'``."
msgstr ""
"これらのシーケンスは文字クラス内に含めることができます。例えば、 ``[\\s,.]`` "
"は空白文字や ``','`` または ``'.'`` にマッチする文字クラスです。"
#: ../../howto/regex.rst:156
msgid ""
"The final metacharacter in this section is ``.``. It matches anything "
"except a newline character, and there's an alternate mode (:const:`re."
"DOTALL`) where it will match even a newline. ``.`` is often used where you "
"want to match \"any character\"."
msgstr ""
"この節での最後の特殊文字は ``.`` です。\n"
"これは改行文字を除く任意の文字にマッチし、さらに改行文字に対してもマッチさせ"
"る代替モード (:const:`re.DOTALL`) があります。\n"
"``.`` は「任意の文字」にマッチさせたい場合に利用されます。"
#: ../../howto/regex.rst:163
msgid "Repeating Things"
msgstr "繰り返し"
#: ../../howto/regex.rst:165
msgid ""
"Being able to match varying sets of characters is the first thing regular "
"expressions can do that isn't already possible with the methods available on "
"strings. However, if that was the only additional capability of regexes, "
"they wouldn't be much of an advance. Another capability is that you can "
"specify that portions of the RE must be repeated a certain number of times."
msgstr ""
"さまざまな文字集合をマッチさせることは正規表現で最初にできるようになること"
"で、これは文字列に対するメソッドですぐにできることではありません。しかし、正"
"規表現がより力を発揮する場面がこれだけだとすると、正規表現はあまり先進的とは"
"いえません。正規表現の力をもう一つの能力は、正規表現の一部が何度も繰り返され"
"るようものを指定できることです。"
#: ../../howto/regex.rst:171
msgid ""
"The first metacharacter for repeating things that we'll look at is ``*``. "
"``*`` doesn't match the literal character ``'*'``; instead, it specifies "
"that the previous character can be matched zero or more times, instead of "
"exactly once."
msgstr ""
"最初にとりあげる繰り返しのための最初の特殊文字は ``*`` です。\n"
"``*`` は文字リテラル ``'*'`` とはマッチしません; その代わりに、前の文字がぴっ"
"たり1回ではなく0回以上繰り返されるパターンを指定します。"
#: ../../howto/regex.rst:175
msgid ""
"For example, ``ca*t`` will match ``'ct'`` (0 ``'a'`` characters), ``'cat'`` "
"(1 ``'a'``), ``'caaat'`` (3 ``'a'`` characters), and so forth."
msgstr ""
"例えば、 ``ca*t`` は ``'ct'`` (文字 ``'a'`` が 0 個)、 ``'cat'`` (``'a'`` が "
"1 個)、 ``'caaat'`` (``'a'`` が 3 個)、などにマッチします。"
#: ../../howto/regex.rst:178
msgid ""
"Repetitions such as ``*`` are :dfn:`greedy`; when repeating a RE, the "
"matching engine will try to repeat it as many times as possible. If later "
"portions of the pattern don't match, the matching engine will then back up "
"and try again with fewer repetitions."
msgstr ""
"``*`` のような繰り返しは :dfn:`貪欲 (greedy)` です; 正規表現を繰り返したいと"
"き、マッチングエンジンは可能な限り何度も繰り返そうと試みます。パターンの後ろ"
"の部分にマッチしない場合、マッチングエンジンは戻ってより少ない繰り返しを再び"
"試みます。"
#: ../../howto/regex.rst:183
msgid ""
"A step-by-step example will make this more obvious. Let's consider the "
"expression ``a[bcd]*b``. This matches the letter ``'a'``, zero or more "
"letters from the class ``[bcd]``, and finally ends with a ``'b'``. Now "
"imagine matching this RE against the string ``'abcbd'``."
msgstr ""
"一歩ずつ例を進めていくとより明確にわかります。\n"
"正規表現 ``a[bcd]*b`` を考えましょう。\n"
"この正規表現は文字 ``'a'`` 、文字クラス ``[bcd]`` の 0 個以上の文字、最後に来"
"る ``'b'`` にマッチします。\n"
"この正規表現が文字列 ``'abcbd'`` に対してマッチする流れを想像してみましょう。"
#: ../../howto/regex.rst:189
msgid "Step"
msgstr "ステップ"
#: ../../howto/regex.rst:189
msgid "Matched"
msgstr "マッチした文字列"
#: ../../howto/regex.rst:189
msgid "Explanation"
msgstr "説明"
#: ../../howto/regex.rst:191
msgid "1"
msgstr "1"
#: ../../howto/regex.rst:191
msgid "``a``"
msgstr "``a``"
#: ../../howto/regex.rst:191
msgid "The ``a`` in the RE matches."
msgstr "正規表現の ``a`` がマッチ。"
#: ../../howto/regex.rst:193
msgid "2"
msgstr "2"
#: ../../howto/regex.rst:193
msgid "``abcbd``"
msgstr "``abcbd``"
#: ../../howto/regex.rst:193
msgid ""
"The engine matches ``[bcd]*``, going as far as it can, which is to the end "
"of the string."
msgstr ""
"正規表現エンジンが、文字列の終わりに向かってできるだけ遠くまで ``[bcd]*`` を"
"マッチさせる。"
#: ../../howto/regex.rst:197
msgid "3"
msgstr "3"
#: ../../howto/regex.rst:197 ../../howto/regex.rst:205
msgid "*Failure*"
msgstr "*失敗*"
#: ../../howto/regex.rst:197
msgid ""
"The engine tries to match ``b``, but the current position is at the end of "
"the string, so it fails."
msgstr ""
"正規表現エンジンが ``b`` でマッチを試みるが、現在の位置が文字列の最後なので失"
"敗。"
#: ../../howto/regex.rst:202
msgid "4"
msgstr "4"
#: ../../howto/regex.rst:202 ../../howto/regex.rst:213
msgid "``abcb``"
msgstr "``abcb``"
#: ../../howto/regex.rst:202
msgid "Back up, so that ``[bcd]*`` matches one less character."
msgstr "``[bcd]*`` が一文字少なくマッチするように戻る。"
#: ../../howto/regex.rst:205
msgid "5"
msgstr "5"
#: ../../howto/regex.rst:205
msgid ""
"Try ``b`` again, but the current position is at the last character, which is "
"a ``'d'``."
msgstr "再び ``b`` にマッチするか試みるが、現在の位置は最後の文字 ``'d'`` 。"
#: ../../howto/regex.rst:209 ../../howto/regex.rst:213
msgid "6"
msgstr "6"
#: ../../howto/regex.rst:209
msgid "``abc``"
msgstr "``abc``"
#: ../../howto/regex.rst:209
msgid "Back up again, so that ``[bcd]*`` is only matching ``bc``."
msgstr "``[bcd]*`` は ``bc`` のみにマッチするように再び戻る。"
#: ../../howto/regex.rst:213
msgid ""
"Try ``b`` again. This time the character at the current position is "
"``'b'``, so it succeeds."
msgstr "再び ``b`` を試みる。今回の現在位置の文字は ``'b'`` なので成功。"
#: ../../howto/regex.rst:219
msgid ""
"The end of the RE has now been reached, and it has matched ``'abcb'``. This "
"demonstrates how the matching engine goes as far as it can at first, and if "
"no match is found it will then progressively back up and retry the rest of "
"the RE again and again. It will back up until it has tried zero matches for "
"``[bcd]*``, and if that subsequently fails, the engine will conclude that "
"the string doesn't match the RE at all."
msgstr ""
"正規表現の終端に達して、 ``'abcd'`` にマッチしました。\n"
"この説明は、マッチングエンジンが最初に到達できるところまで進みマッチしなかっ"
"た場合、逐次戻って再度残りの正規表現とのマッチを次々と試みること様子を示して"
"います。\n"
"正規表現エンジンは ``[bcd]*`` の 0 回マッチを試すところまで戻り、その後続の正"
"規表現とのマッチに失敗した場合には、エンジンは正規表現と文字列が完全にマッチ"
"しないと結論づけることになります。"
#: ../../howto/regex.rst:226
msgid ""
"Another repeating metacharacter is ``+``, which matches one or more times. "
"Pay careful attention to the difference between ``*`` and ``+``; ``*`` "
"matches *zero* or more times, so whatever's being repeated may not be "
"present at all, while ``+`` requires at least *one* occurrence. To use a "
"similar example, ``ca+t`` will match ``'cat'`` (1 ``'a'``), ``'caaat'`` (3 "
"``'a'``\\ s), but won't match ``'ct'``."
msgstr ""
"別の繰り返しのメタ文字には ``+`` があり、この特殊文字は 1 回以上の繰り返しに"
"マッチします。\n"
"``*`` と ``+`` に違いに対しては十分注意して下さい; ``*`` は *0 回* 以上の繰り"
"返しにマッチするので、繰り返す部分が全くなくても問題ありません。一方で ``+`` "
"は少なくとも *1 回* は表われる必要があります。\n"
"同様の例を使うと ``ca+t`` は ``'cat'`` (``'a'`` 1 文字)、 ``'caaat'`` "
"(``'a'`` 3 文字)、とマッチし、``'ct'`` とはマッチしません。"
#: ../../howto/regex.rst:233
msgid ""
"There are two more repeating qualifiers. The question mark character, ``?"
"``, matches either once or zero times; you can think of it as marking "
"something as being optional. For example, ``home-?brew`` matches either "
"``'homebrew'`` or ``'home-brew'``."
msgstr ""
"2回以上の繰り返しを制限する修飾子も存在します。\n"
"クエスチョンマーク ``?`` は0か1回のどちらかにマッチします; これはオプショナル"
"な何かを示しているとも考えられます。\n"
"例えば、``home-?brew`` は ``'homebrew'`` と ``'home-brew'`` のどちらにもマッ"
"チします。"
#: ../../howto/regex.rst:238
msgid ""
"The most complicated repeated qualifier is ``{m,n}``, where *m* and *n* are "
"decimal integers. This qualifier means there must be at least *m* "
"repetitions, and at most *n*. For example, ``a/{1,3}b`` will match ``'a/"
"b'``, ``'a//b'``, and ``'a///b'``. It won't match ``'ab'``, which has no "
"slashes, or ``'a////b'``, which has four."
msgstr ""
"最も複雑な繰り返しの修飾子は ``{m,n}`` で、ここで *m* と *n* は 10 進整数で"
"す。\n"
"この修飾子は最低 *m* 回、最大で *n* 回の繰り返すことを意味しています。\n"
"例えば、 ``a/{1,3}b`` は ``'a/b'`` と ``'a//b'`` そして ``'a///b'`` にマッチ"
"し、スラッシュの無い ``'ab'`` や4つのスラッシュを持つ ``'a////b'`` にはマッチ"
"しません。"
#: ../../howto/regex.rst:244
msgid ""
"You can omit either *m* or *n*; in that case, a reasonable value is assumed "
"for the missing value. Omitting *m* is interpreted as a lower limit of 0, "
"while omitting *n* results in an upper bound of infinity."
msgstr ""
"*m* か *n* のどちらかは省略することができます; その場合は、省略された値は合理"
"的な値が仮定されます。\n"
"*m* の省略は下限は 0 と解釈され、*n* の省略は上限は無限として解釈されます。"
#: ../../howto/regex.rst:248
msgid ""
"Readers of a reductionist bent may notice that the three other qualifiers "
"can all be expressed using this notation. ``{0,}`` is the same as ``*``, "
"``{1,}`` is equivalent to ``+``, and ``{0,1}`` is the same as ``?``. It's "
"better to use ``*``, ``+``, or ``?`` when you can, simply because they're "
"shorter and easier to read."
msgstr ""
"還元主義者傾向のある読者は、3つの修飾子がこの表記を使って表現できることに気付"
"くでしょう。\n"
"``{0,}`` は ``*`` と、 ``{1,}`` は ``+`` と、そして ``{0,1}`` は ``?`` と同じ"
"です。\n"
"できるなら ``*``, ``+``, ``?`` を利用した方が賢明です。それは単に、短く読み易"
"くなるからです。"
#: ../../howto/regex.rst:256
msgid "Using Regular Expressions"
msgstr "正規表現を使う"
#: ../../howto/regex.rst:258
msgid ""
"Now that we've looked at some simple regular expressions, how do we actually "
"use them in Python? The :mod:`re` module provides an interface to the "
"regular expression engine, allowing you to compile REs into objects and then "
"perform matches with them."
msgstr ""
"これまででいくつかの単純な正規表現に触れてきました、実際に Python ではこれら"
"をどう使えばいいのでしょう? :mod:`re` モジュールは正規表現エンジンに対するイ"
"ンターフェースを提供していて、それらを使うことで正規表現をオブジェクトにコン"
"パイルし、マッチを実行することができます。"
#: ../../howto/regex.rst:265
msgid "Compiling Regular Expressions"
msgstr "正規表現をコンパイルする"
#: ../../howto/regex.rst:267
msgid ""
"Regular expressions are compiled into pattern objects, which have methods "
"for various operations such as searching for pattern matches or performing "
"string substitutions. ::"
msgstr ""
"正規表現はパターンオブジェクトにコンパイルされます、パターンオブジェクトは多"
"くの操作、パターンマッチの検索や文字列の置換の実行などのメソッドを持っていま"
"す。 ::"
#: ../../howto/regex.rst:276
msgid ""
":func:`re.compile` also accepts an optional *flags* argument, used to enable "
"various special features and syntax variations. We'll go over the available "
"settings later, but for now a single example will do::"
msgstr ""
":func:`re.compile` はいくつかの *flags* 引数を受け付けることができます、この"
"引数はさまざまな特別な機能を有効にしたり、構文を変化させたりします。利用でき"
"る設定に何があるかは後に飛ばすことにして、簡単な例をやることにしましょう::"
#: ../../howto/regex.rst:282
msgid ""
"The RE is passed to :func:`re.compile` as a string. REs are handled as "
"strings because regular expressions aren't part of the core Python language, "
"and no special syntax was created for expressing them. (There are "
"applications that don't need REs at all, so there's no need to bloat the "
"language specification by including them.) Instead, the :mod:`re` module is "
"simply a C extension module included with Python, just like the :mod:"
"`socket` or :mod:`zlib` modules."
msgstr ""
"正規表現は文字列として :func:`re.compile` に渡されます。正規表現は文字列とし"
"て扱われますが、それは正規表現が Python 言語のコアシステムに含まれないためで"
"す、そのため正規表現を表わす特殊な構文はありません。 (正規表現を全く必要とし"
"ないアプリケーションも存在します、そのためそれらを含めて言語仕様を無駄に大き"
"くする必要はありません) その代わり、 :mod:`re` モジュールは :mod:`socket` "
"や :mod:`zlib` モジュールのような通常の C 拡張モジュールとして Python に含ま"
"れています。"
#: ../../howto/regex.rst:289
msgid ""
"Putting REs in strings keeps the Python language simpler, but has one "
"disadvantage which is the topic of the next section."
msgstr ""
"正規表現を文字列としておくことで Python 言語はより簡素に保たれていますが、そ"
"のため1つの欠点があります、これについては次の節で話題とします。"
#: ../../howto/regex.rst:296
msgid "The Backslash Plague"
msgstr "バックスラッシュ感染症"
#: ../../howto/regex.rst:298
msgid ""
"As stated earlier, regular expressions use the backslash character "
"(``'\\'``) to indicate special forms or to allow special characters to be "
"used without invoking their special meaning. This conflicts with Python's "
"usage of the same character for the same purpose in string literals."
msgstr ""
"先に述べたように、正規表現は特別な形式や特殊な文字の特別な意味を意味を除くこ"
"とを示すためにバックスラッシュ文字 (``'\\'``) を利用します。これは Python が"
"文字列リテラルに対して、同じ文字を同じ目的で使うことと衝突します。"
#: ../../howto/regex.rst:303
msgid ""
"Let's say you want to write a RE that matches the string ``\\section``, "
"which might be found in a LaTeX file. To figure out what to write in the "
"program code, start with the desired string to be matched. Next, you must "
"escape any backslashes and other metacharacters by preceding them with a "
"backslash, resulting in the string ``\\\\section``. The resulting string "
"that must be passed to :func:`re.compile` must be ``\\\\section``. However, "
"to express this as a Python string literal, both backslashes must be escaped "
"*again*."
msgstr ""
"``\\section`` という文字列 (これは LaTeX ファイルでみかけます) にマッチする正"
"規表現を書きたいとします。どんなプログラムを書くか考え、マッチして欲しい文字"
"列をはじめに考えます。次に、バックスラッシュや他の特殊文字をバックスラッシュ"
"に続けて書くことでエスケープしなければいけません、その結果 ``\\\\section`` の"
"ような文字列となります。こうしてできた :func:`re.compile` に渡す文字列は ``\\"
"\\section`` でなければいけません。しかし、これを Python の文字列リテラルとし"
"て扱うにはこの二つのバックスラッシュを *再び* エスケープする必要があります。"
#: ../../howto/regex.rst:312
msgid "Characters"
msgstr "文字"
#: ../../howto/regex.rst:312
msgid "Stage"
msgstr "段階"
#: ../../howto/regex.rst:314
msgid "``\\section``"
msgstr "``\\section``"
#: ../../howto/regex.rst:314
msgid "Text string to be matched"
msgstr "マッチさせるテキスト"
#: ../../howto/regex.rst:316
msgid "``\\\\section``"
msgstr "``\\\\section``"
#: ../../howto/regex.rst:316
msgid "Escaped backslash for :func:`re.compile`"
msgstr ":func:`re.compile` のためのバックスラッシュエスケープ"
#: ../../howto/regex.rst:318 ../../howto/regex.rst:345
msgid "``\"\\\\\\\\section\"``"
msgstr "``\"\\\\\\\\section\"``"
#: ../../howto/regex.rst:318
msgid "Escaped backslashes for a string literal"
msgstr "文字列リテラルのためのバックスラッシュエスケープ"
#: ../../howto/regex.rst:321
msgid ""
"In short, to match a literal backslash, one has to write ``'\\\\\\\\'`` as "
"the RE string, because the regular expression must be ``\\\\``, and each "
"backslash must be expressed as ``\\\\`` inside a regular Python string "
"literal. In REs that feature backslashes repeatedly, this leads to lots of "
"repeated backslashes and makes the resulting strings difficult to understand."
msgstr ""
"要点だけをいえば、リテラルとしてのバックスラッシュにマッチさせるために、正規"
"表現文字列として ``'\\\\\\\\'`` と書かなければいけません、なぜなら正規表現は "
"``\\\\`` であり、通常の Python の文字列リテラルとしてはそれぞれのバックスラッ"
"シュは ``\\\\`` で表現しなければいけないからです。正規表現に関してこのバック"
"スラッシュの繰り返しの機能は、たくさんのバックスラッシュの繰り返しを生むこと"
"になり、その結果として作られる文字列は理解することが難しくなります。"
#: ../../howto/regex.rst:327
msgid ""
"The solution is to use Python's raw string notation for regular expressions; "
"backslashes are not handled in any special way in a string literal prefixed "
"with ``'r'``, so ``r\"\\n\"`` is a two-character string containing ``'\\'`` "
"and ``'n'``, while ``\"\\n\"`` is a one-character string containing a "
"newline. Regular expressions will often be written in Python code using this "
"raw string notation."
msgstr ""
"この問題の解決策としては正規表現に対しては Python の raw string 記法を使うこ"
"とです; ``'r'`` を文字列リテラルの先頭に書くことでバックスラッシュは特別扱い"
"されなくなります、つまり ``\"\\n\"`` は改行を含む1つの文字からなる文字列であ"
"るのに対して、 ``r\"\\n\"`` は2つの文字 ``'\\'`` と ``'n'`` を含む文字列とな"
"ります。多くの場合 Python コードの中の正規表現はこの raw string 記法を使って"
"書かれます。"
#: ../../howto/regex.rst:333
msgid ""
"In addition, special escape sequences that are valid in regular expressions, "
"but not valid as Python string literals, now result in a :exc:"
"`DeprecationWarning` and will eventually become a :exc:`SyntaxError`, which "
"means the sequences will be invalid if raw string notation or escaping the "
"backslashes isn't used."
msgstr ""
"それに加えて、正規表現では有効であるものの Python の文字列リテラルとしては有"
"効でない特殊文字のエスケープシーケンスは、現在では :exc:`DeprecationWarning` "
"を引き起こし、最終的には :exc:`SyntaxError` となります。すなわち、そのような"
"シーケンスは raw string 記法を使うか、バックスラッシュによるエスケープを使わ"
"ないかぎり無効になることを意味します。"
#: ../../howto/regex.rst:341
msgid "Regular String"
msgstr "通常の文字列"
#: ../../howto/regex.rst:341
msgid "Raw string"
msgstr "Raw string"
#: ../../howto/regex.rst:343
msgid "``\"ab*\"``"
msgstr "``\"ab*\"``"
#: ../../howto/regex.rst:343
msgid "``r\"ab*\"``"
msgstr "``r\"ab*\"``"
#: ../../howto/regex.rst:345
msgid "``r\"\\\\section\"``"
msgstr "``r\"\\\\section\"``"
#: ../../howto/regex.rst:347
msgid "``\"\\\\w+\\\\s+\\\\1\"``"
msgstr "``\"\\\\w+\\\\s+\\\\1\"``"
#: ../../howto/regex.rst:347
msgid "``r\"\\w+\\s+\\1\"``"
msgstr "``r\"\\w+\\s+\\1\"``"
#: ../../howto/regex.rst:352
msgid "Performing Matches"
msgstr "マッチの実行"
#: ../../howto/regex.rst:354
msgid ""
"Once you have an object representing a compiled regular expression, what do "
"you do with it? Pattern objects have several methods and attributes. Only "
"the most significant ones will be covered here; consult the :mod:`re` docs "
"for a complete listing."
msgstr ""
"一旦コンパイルした正規表現を表現するオブジェクトを作成したら、次に何をします"
"か? パターンオブジェクトはいくつかのメソッドや属性を持っています。ここでは、"
"その中でも最も重要なものについて扱います; 完全なリストは :mod:`re` ドキュメン"
"トを参照して下さい。"
#: ../../howto/regex.rst:360 ../../howto/regex.rst:418
#: ../../howto/regex.rst:1064
msgid "Method/Attribute"
msgstr "メソッド/属性"
#: ../../howto/regex.rst:360 ../../howto/regex.rst:418
#: ../../howto/regex.rst:1064
msgid "Purpose"
msgstr "目的"
#: ../../howto/regex.rst:362
msgid "``match()``"
msgstr "``match()``"
#: ../../howto/regex.rst:362
msgid "Determine if the RE matches at the beginning of the string."
msgstr "文字列の先頭で正規表現とマッチするか判定します。"
#: ../../howto/regex.rst:365
msgid "``search()``"
msgstr "``search()``"
#: ../../howto/regex.rst:365
msgid "Scan through a string, looking for any location where this RE matches."
msgstr "文字列を先頭から走査して、正規表現がどこにマッチするか調べます。"
#: ../../howto/regex.rst:368
msgid "``findall()``"
msgstr "``findall()``"
#: ../../howto/regex.rst:368
msgid "Find all substrings where the RE matches, and returns them as a list."
msgstr "正規表現にマッチする部分文字列を全て探しだしリストとして返します。"
#: ../../howto/regex.rst:371
msgid "``finditer()``"
msgstr "``finditer()``"
#: ../../howto/regex.rst:371
msgid ""
"Find all substrings where the RE matches, and returns them as an :term:"
"`iterator`."
msgstr ""
"正規表現にマッチする部分文字列を全て探しだし :term:`iterator` として返しま"
"す。"
#: ../../howto/regex.rst:375
msgid ""
":meth:`~re.Pattern.match` and :meth:`~re.Pattern.search` return ``None`` if "
"no match can be found. If they're successful, a :ref:`match object <match-"
"objects>` instance is returned, containing information about the match: "
"where it starts and ends, the substring it matched, and more."
msgstr ""
":meth:`~re.Pattern.match` と :meth:`~re.Pattern.search` はマッチするものが見"
"つからなければ ``None`` を返します。\n"
"成功すればそれらは :ref:`Match オブジェクト <match-objects>` のインスタンスを"
"返します。このオブジェクトにはマッチした情報が含まれます: マッチの開始と終了"
"位置、マッチした部分文字列、など。"
#: ../../howto/regex.rst:380
msgid ""
"You can learn about this by interactively experimenting with the :mod:`re` "
"module. If you have :mod:`tkinter` available, you may also want to look at :"
"source:`Tools/demo/redemo.py`, a demonstration program included with the "
"Python distribution. It allows you to enter REs and strings, and displays "
"whether the RE matches or fails. :file:`redemo.py` can be quite useful when "
"trying to debug a complicated RE."
msgstr ""
":mod:`re` モジュールで対話的に実験することで学ぶこともできます。 :mod:"
"`tkinter` が利用できれば、Python に含まれるデモプログラム :source:`Tools/"
"demo/redemo.py` を見るといいかもしれません。このデモは正規表現と文字列を入力"
"し、正規表現がマッチしたかどうかを表示します。 :file:`redemo.py` は複雑な正規"
"表現のデバッグを試みるときにも便利に使うことができます。"
#: ../../howto/regex.rst:387
msgid ""
"This HOWTO uses the standard Python interpreter for its examples. First, run "
"the Python interpreter, import the :mod:`re` module, and compile a RE::"
msgstr ""
"この HOWTO では例として標準の Python インタプリタを使います。最初に Python イ"
"ンタプリタを起動して、 :mod:`re` モジュールをインポートし、正規表現をコンパイ"
"ルします::"
#: ../../howto/regex.rst:395
msgid ""
"Now, you can try matching various strings against the RE ``[a-z]+``. An "
"empty string shouldn't match at all, since ``+`` means 'one or more "
"repetitions'. :meth:`~re.Pattern.match` should return ``None`` in this case, "
"which will cause the interpreter to print no output. You can explicitly "
"print the result of :meth:`!match` to make this clear. ::"
msgstr ""
"さて、いろいろな文字列を使って正規表現 ``[a-z]+`` に対するマッチングを試して"
"みましょう。空の文字列は全くマッチしません、なぜなら ``+`` は「1 回以上の繰り"
"返し」を意味するからです。この場合では :meth:`~re.Pattern.match` は ``None`` "
"を返すべきで、インタプタは何も出力しません。明確にするために :meth:`!match` "
"の結果を明示的に出力することもできます::"
#: ../../howto/regex.rst:405
msgid ""
"Now, let's try it on a string that it should match, such as ``tempo``. In "
"this case, :meth:`~re.Pattern.match` will return a :ref:`match object <match-"
"objects>`, so you should store the result in a variable for later use. ::"
msgstr ""
"では、今度はマッチするはずの文字列、例えば ``tempo`` を試してみましょう。この"
"ケースでは、 :meth:`~re.Pattern.match` は :ref:`match object <match-"
"objects>` を返すので、後で使うために結果を変数に記憶しておくべきです。 ::"
#: ../../howto/regex.rst:413
msgid ""
"Now you can query the :ref:`match object <match-objects>` for information "
"about the matching string. Match object instances also have several methods "
"and attributes; the most important ones are:"
msgstr ""
"これでマッチした文字列についての情報を :ref:`Match オブジェクト <match-"
"objects>` に問い合わせることが出来ます。\n"
"Match オブジェクトインスタンスはいくつかのメソッドと属性も持っていて、最も重"
"要なのは次のものです:"
#: ../../howto/regex.rst:420
msgid "``group()``"
msgstr "``group()``"
#: ../../howto/regex.rst:420
msgid "Return the string matched by the RE"
msgstr "正規表現にマッチした文字列を返す"
#: ../../howto/regex.rst:422
msgid "``start()``"
msgstr "``start()``"
#: ../../howto/regex.rst:422
msgid "Return the starting position of the match"
msgstr "マッチの開始位置を返す"
#: ../../howto/regex.rst:424
msgid "``end()``"
msgstr "``end()``"
#: ../../howto/regex.rst:424
msgid "Return the ending position of the match"
msgstr "マッチの終了位置を返す"
#: ../../howto/regex.rst:426
msgid "``span()``"
msgstr "``span()``"
#: ../../howto/regex.rst:426
msgid "Return a tuple containing the (start, end) positions of the match"
msgstr "マッチの位置 (start, end) を含むタプルを返す"
#: ../../howto/regex.rst:430
msgid "Trying these methods will soon clarify their meaning::"
msgstr "これらのメソッドを試せば、その意味はすぐに理解できます::"
#: ../../howto/regex.rst:439
msgid ""
":meth:`~re.Match.group` returns the substring that was matched by the RE. :"
"meth:`~re.Match.start` and :meth:`~re.Match.end` return the starting and "
"ending index of the match. :meth:`~re.Match.span` returns both start and end "
"indexes in a single tuple. Since the :meth:`~re.Pattern.match` method only "
"checks if the RE matches at the start of a string, :meth:`!start` will "
"always be zero. However, the :meth:`~re.Pattern.search` method of patterns "
"scans through the string, so the match may not start at zero in that "
"case. ::"
msgstr ""
":meth:`~re.Match.group` は正規表現でマッチした部分文字列を返します。 :meth:"
"`~re.Match.start` と :meth:`~re.Match.end` はそれぞれ、マッチの開始インデクス"
"と終了インデクスを返します。 :meth:`~re.Match.span` は開始と終了のインデクス"
"を一つのタプルにして返します。\n"
":meth:`~re.Pattern.match` メソッドは正規表現が文字列の開始位置でマッチするか"
"どうかだけをチェックするので、 :meth:`!start` は必ずゼロを返します。\n"
"しかし、 :meth:`~re.Pattern.search` メソッドではパターンを文字列全体について"
"走査するので、マッチの開始はゼロにならないかもしれません。 ::"