@@ -10,8 +10,8 @@ msgstr ""
10
10
"Project-Id-Version : Python 3.11\n "
11
11
"Report-Msgid-Bugs-To : \n "
12
12
"POT-Creation-Date : 2022-10-15 20:43+0000\n "
13
- "PO-Revision-Date : 2023-04-29 13 :31+0000\n "
14
- "Last-Translator : Josix <josixwang @gmail.com>\n "
13
+ "PO-Revision-Date : 2023-05-02 15 :31+0000\n "
14
+ "Last-Translator : raymond <raymond727341 @gmail.com>\n "
15
15
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh-tw) "
16
16
"\n "
17
17
"Language : regex\n "
@@ -775,7 +775,6 @@ msgid "``search()``"
775
775
msgstr "``search()``"
776
776
777
777
#: ../../howto/regex.rst:365
778
- #, fuzzy
779
778
msgid "Scan through a string, looking for any location where this RE matches."
780
779
msgstr "掃描字串,尋找任何符合正規表示式的位置。"
781
780
@@ -792,14 +791,12 @@ msgid "``finditer()``"
792
791
msgstr "``finditer()``"
793
792
794
793
#: ../../howto/regex.rst:371
795
- #, fuzzy
796
794
msgid ""
797
795
"Find all substrings where the RE matches, and returns them as an :term:"
798
796
"`iterator`."
799
797
msgstr "尋找所有符合正規表示式的子字串,並以 :term:`iterator` 形式回傳它們。"
800
798
801
799
#: ../../howto/regex.rst:375
802
- #, fuzzy
803
800
msgid ""
804
801
":meth:`~re.Pattern.match` and :meth:`~re.Pattern.search` return ``None`` if "
805
802
"no match can be found. If they're successful, a :ref:`match object <match-"
@@ -812,7 +809,6 @@ msgstr ""
812
809
"匹配開始和結束位置、它所匹配的子字串等等。"
813
810
814
811
#: ../../howto/regex.rst:380
815
- #, fuzzy
816
812
msgid ""
817
813
"You can learn about this by interactively experimenting with the :mod:`re` "
818
814
"module. If you have :mod:`tkinter` available, you may also want to look at :"
@@ -827,7 +823,6 @@ msgstr ""
827
823
"正則表達式時,:file:`redemo.py` 可能非常實用。"
828
824
829
825
#: ../../howto/regex.rst:387
830
- #, fuzzy
831
826
msgid ""
832
827
"This HOWTO uses the standard Python interpreter for its examples. First, run "
833
828
"the Python interpreter, import the :mod:`re` module, and compile a RE::"
@@ -836,23 +831,21 @@ msgstr ""
836
831
"``re`` 模組,並編譯一個正規表示式 (RE):"
837
832
838
833
#: ../../howto/regex.rst:395
839
- #, fuzzy
840
834
msgid ""
841
835
"Now, you can try matching various strings against the RE ``[a-z]+``. An "
842
836
"empty string shouldn't match at all, since ``+`` means 'one or more "
843
837
"repetitions'. :meth:`~re.Pattern.match` should return ``None`` in this case, "
844
838
"which will cause the interpreter to print no output. You can explicitly "
845
839
"print the result of :meth:`!match` to make this clear. ::"
846
840
msgstr ""
847
- "現在,你可以嘗試將各種字串與正規表示式 ``[a-z]+`` 進行匹配。由於 ``+`` 的含義 "
848
- "是 「出現一次或多次」,因此空字串應該根本沒有匹配 。這種情況下,:meth:`~re."
841
+ "現在,你可以嘗試將各種字串與正規表示式 ``[a-z]+`` 進行匹配。因為 ``+`` "
842
+ "的含義是 「出現一次或多次」,所以空字串應該沒有匹配 。這種情況下,:meth:`~re."
849
843
"Pattern.match` 應返回 ``None`` ,進解譯器不會輸出任何內容。您可以明確地打印 "
850
844
":meth:`!match` 的結果以使其清楚明白。.. code-block:: python import re "
851
845
"pattern = re.compile(r'[a-z]+') match_object = pattern.match('') # The "
852
846
"output of `print(match_object)` is None"
853
847
854
848
#: ../../howto/regex.rst:405
855
- #, fuzzy
856
849
msgid ""
857
850
"Now, let's try it on a string that it should match, such as ``tempo``. In "
858
851
"this case, :meth:`~re.Pattern.match` will return a :ref:`match object <match-"
@@ -863,7 +856,6 @@ msgstr ""
863
856
"objects>`,所以您應當將結果存入變數中以供後續使用。::"
864
857
865
858
#: ../../howto/regex.rst:413
866
- #, fuzzy
867
859
msgid ""
868
860
"Now you can query the :ref:`match object <match-objects>` for information "
869
861
"about the matching string. Match object instances also have several methods "
@@ -877,7 +869,6 @@ msgid "``group()``"
877
869
msgstr "``group()``"
878
870
879
871
#: ../../howto/regex.rst:420
880
- #, fuzzy
881
872
msgid "Return the string matched by the RE"
882
873
msgstr "回傳正規表示式 (RE) 所匹配的字串。"
883
874
@@ -886,16 +877,14 @@ msgid "``start()``"
886
877
msgstr "``start()``"
887
878
888
879
#: ../../howto/regex.rst:422
889
- #, fuzzy
890
880
msgid "Return the starting position of the match"
891
- msgstr "傳回符合項目的起始位置 "
881
+ msgstr "傳回匹配項目的起始位置 "
892
882
893
883
#: ../../howto/regex.rst:424
894
884
msgid "``end()``"
895
885
msgstr "``end()``"
896
886
897
887
#: ../../howto/regex.rst:424
898
- #, fuzzy
899
888
msgid "Return the ending position of the match"
900
889
msgstr "傳回匹配項目結束的位置"
901
890
@@ -904,17 +893,14 @@ msgid "``span()``"
904
893
msgstr "``span()``"
905
894
906
895
#: ../../howto/regex.rst:426
907
- #, fuzzy
908
896
msgid "Return a tuple containing the (start, end) positions of the match"
909
897
msgstr "回傳一個包含匹配位置 (起始,結束) 的元組"
910
898
911
899
#: ../../howto/regex.rst:430
912
- #, fuzzy
913
900
msgid "Trying these methods will soon clarify their meaning::"
914
- msgstr "嘗試這些方法很快就會澄清它們的意思 :"
901
+ msgstr "嘗試這些方法能快速理解它們的意思 :"
915
902
916
903
#: ../../howto/regex.rst:439
917
- #, fuzzy
918
904
msgid ""
919
905
":meth:`~re.Match.group` returns the substring that was matched by the RE. :"
920
906
"meth:`~re.Match.start` and :meth:`~re.Match.end` return the starting and "
@@ -929,11 +915,10 @@ msgstr ""
929
915
".start` 和 :meth:`~re.Match.end` 方法分別返回匹配開始和結束的索引,而 "
930
916
":meth:`~re.Match.span` 會一次性返回起始和結束位置。 因為:meth:`~re.Pattern."
931
917
"match`方法只是檢查 RE 是否從字符串開頭進行匹配,所以:meth:`!start` "
932
- "總是等於零。 但是 ,在模式使用的:meth:`~re.Pattern."
918
+ "總是等於零。 然而 ,在模式使用的:meth:`~re.Pattern."
933
919
"search`方法中,掃描整個字符串時匹配可能不從零位置開始。 ::"
934
920
935
921
#: ../../howto/regex.rst:456
936
- #, fuzzy
937
922
msgid ""
938
923
"In actual programs, the most common style is to store the :ref:`match object "
939
924
"<match-objects>` in a variable, and then check if it was ``None``. This "
@@ -943,15 +928,13 @@ msgstr ""
943
928
"存儲在一個變量中,然後檢查它是否為 ``None``。通常看起來像這樣:"
944
929
945
930
#: ../../howto/regex.rst:467
946
- #, fuzzy
947
931
msgid ""
948
932
"Two pattern methods return all of the matches for a pattern. :meth:`~re."
949
933
"Pattern.findall` returns a list of matching strings::"
950
934
msgstr "兩種模式方法可返回符合樣式的所有結果。 :meth:`~re.Pattern.findall` "
951
935
"返回匹配字串列表:"
952
936
953
937
#: ../../howto/regex.rst:474
954
- #, fuzzy
955
938
msgid ""
956
939
"The ``r`` prefix, making the literal a raw string literal, is needed in this "
957
940
"example because escape sequences in a normal \" cooked\" string literal that "
@@ -962,11 +945,10 @@ msgstr ""
962
945
"在此例子中,必須使用``r``前綴來將字面值變成一個原始字串文字(r raw string "
963
946
"literal),因為在正常的 \" cooked\" "
964
947
"字串文字中轉義字元如果不被Python識別(相較於正則表達式),現在會產生 "
965
- ":exc:`DeprecationWarning` 錯誤訊息並最終成為 :exc:`SyntaxError`. 觀看 :ref"
966
- ":`the-backslash-plague`. "
948
+ ":exc:`DeprecationWarning` 錯誤訊息並最終成為 :exc:`SyntaxError。 請見 :ref"
949
+ ":`the-backslash-plague`。 "
967
950
968
951
#: ../../howto/regex.rst:480
969
- #, fuzzy
970
952
msgid ""
971
953
":meth:`~re.Pattern.findall` has to create the entire list before it can be "
972
954
"returned as the result. The :meth:`~re.Pattern.finditer` method returns a "
@@ -978,7 +960,6 @@ msgstr ""
978
960
"objects>`實例:"
979
961
980
962
#: ../../howto/regex.rst:496
981
- #, fuzzy
982
963
msgid "Module-Level Functions"
983
964
msgstr "模組級函式"
984
965
@@ -999,7 +980,6 @@ msgstr ""
999
980
" 實例。 ::"
1000
981
1001
982
#: ../../howto/regex.rst:510
1002
- #, fuzzy
1003
983
msgid ""
1004
984
"Under the hood, these functions simply create a pattern object for you and "
1005
985
"call the appropriate method on it. They also store the compiled object in a "
@@ -1010,23 +990,21 @@ msgstr ""
1010
990
"譯的物件儲存在快取中,因此未來使用相同的正規表示式時不需要再次解析模式。"
1011
991
1012
992
#: ../../howto/regex.rst:515
1013
- #, fuzzy
1014
993
msgid ""
1015
994
"Should you use these module-level functions, or should you get the pattern "
1016
995
"and call its methods yourself? If you're accessing a regex within a loop, "
1017
996
"pre-compiling it will save a few function calls. Outside of loops, there's "
1018
997
"not much difference thanks to the internal cache."
1019
998
msgstr ""
1020
- "如果您正在迴圈中存取正規表示式,事前編譯可以減少一些函數呼叫。在迴圈外部由於"
1021
- "內部快取的原因,使用這些模組級別函數和直接調用它的方法沒有太大區別。"
999
+ "你應該使用這些模組級函數,還是取得模式並自己呼叫?如果您正在迴圈中存取正規表"
1000
+ "示式,事前編譯可以減少一些函數呼叫。在迴圈外部由於內部快取的原因,使用這些模"
1001
+ "組級別函數和直接調用它的方法沒有太大區別。"
1022
1002
1023
1003
#: ../../howto/regex.rst:523
1024
- #, fuzzy
1025
1004
msgid "Compilation Flags"
1026
- msgstr "編譯標誌 "
1005
+ msgstr "編譯旗幟 "
1027
1006
1028
1007
#: ../../howto/regex.rst:525
1029
- #, fuzzy
1030
1008
msgid ""
1031
1009
"Compilation flags let you modify some aspects of how regular expressions "
1032
1010
"work. Flags are available in the :mod:`re` module under two names, a long "
@@ -1037,27 +1015,24 @@ msgid ""
1037
1015
"them; ``re.I | re.M`` sets both the :const:`I` and :const:`M` flags, for "
1038
1016
"example."
1039
1017
msgstr ""
1040
- "編譯旗標可以讓你修改常規表達式的某些功能 。在 :mod:`re` "
1018
+ "編譯旗幟可以讓你修改常規表達式的某些功能 。在 :mod:`re` "
1041
1019
"模組中提供了兩個名稱形式:一個是長名稱,如 "
1042
1020
":const:`IGNORECASE`,另一個是短名稱,如 "
1043
1021
":const:`I`(如果您熟悉Perl的模式修飾符,在Python裡也有相同的字母;例如: "
1044
- "re.VERBOSE 的簡写是 「re.X」)。可以通過按位 OR () 來指定多个旗帜 ; 例如,``"
1045
- "re.I | re.M`` 同時設置了 :const:`I ` 和: const`:M ` 旗標 "
1022
+ "re.VERBOSE 的簡寫是 「re.X」)。可以通過按位 OR () 來指定多个旗幟 ; 例如,``"
1023
+ "re.I | re.M`` 同時設置了 :const:`I ` 和: const`:M ` 旗幟。 "
1046
1024
1047
1025
#: ../../howto/regex.rst:533
1048
- #, fuzzy
1049
1026
msgid ""
1050
1027
"Here's a table of the available flags, followed by a more detailed "
1051
1028
"explanation of each one."
1052
- msgstr "下表列出了可用的標誌,接下來是每個標誌的更詳細說明 。"
1029
+ msgstr "下表列出了可用的旗幟,接下來是每個旗幟的詳細說明 。"
1053
1030
1054
1031
#: ../../howto/regex.rst:537
1055
- #, fuzzy
1056
1032
msgid "Flag"
1057
- msgstr "旗標 "
1033
+ msgstr "旗幟 "
1058
1034
1059
1035
#: ../../howto/regex.rst:537
1060
- #, fuzzy
1061
1036
msgid "Meaning"
1062
1037
msgstr "意思,含義"
1063
1038
0 commit comments