Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 70e701d

Browse files
mingray0121weblate
authored andcommitted
Translated using Weblate (regex (generated) (regex))
Currently translated at 70.6% (202 of 286 strings) Translation: python-doc-zhtw/howto Translate-URL: http://weblate.andyjjrt.cc/projects/python-doc-zhtw/howto/regex/
1 parent 58545f0 commit 70e701d

File tree

1 file changed

+18
-43
lines changed

1 file changed

+18
-43
lines changed

howto/regex.po

Lines changed: 18 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ msgstr ""
1010
"Project-Id-Version: Python 3.11\n"
1111
"Report-Msgid-Bugs-To: \n"
1212
"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"
1515
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-tw)"
1616
"\n"
1717
"Language: regex\n"
@@ -775,7 +775,6 @@ msgid "``search()``"
775775
msgstr "``search()``"
776776

777777
#: ../../howto/regex.rst:365
778-
#, fuzzy
779778
msgid "Scan through a string, looking for any location where this RE matches."
780779
msgstr "掃描字串,尋找任何符合正規表示式的位置。"
781780

@@ -792,14 +791,12 @@ msgid "``finditer()``"
792791
msgstr "``finditer()``"
793792

794793
#: ../../howto/regex.rst:371
795-
#, fuzzy
796794
msgid ""
797795
"Find all substrings where the RE matches, and returns them as an :term:"
798796
"`iterator`."
799797
msgstr "尋找所有符合正規表示式的子字串,並以 :term:`iterator` 形式回傳它們。"
800798

801799
#: ../../howto/regex.rst:375
802-
#, fuzzy
803800
msgid ""
804801
":meth:`~re.Pattern.match` and :meth:`~re.Pattern.search` return ``None`` if "
805802
"no match can be found. If they're successful, a :ref:`match object <match-"
@@ -812,7 +809,6 @@ msgstr ""
812809
"匹配開始和結束位置、它所匹配的子字串等等。"
813810

814811
#: ../../howto/regex.rst:380
815-
#, fuzzy
816812
msgid ""
817813
"You can learn about this by interactively experimenting with the :mod:`re` "
818814
"module. If you have :mod:`tkinter` available, you may also want to look at :"
@@ -827,7 +823,6 @@ msgstr ""
827823
"正則表達式時,:file:`redemo.py` 可能非常實用。"
828824

829825
#: ../../howto/regex.rst:387
830-
#, fuzzy
831826
msgid ""
832827
"This HOWTO uses the standard Python interpreter for its examples. First, run "
833828
"the Python interpreter, import the :mod:`re` module, and compile a RE::"
@@ -836,23 +831,21 @@ msgstr ""
836831
"``re`` 模組,並編譯一個正規表示式 (RE):"
837832

838833
#: ../../howto/regex.rst:395
839-
#, fuzzy
840834
msgid ""
841835
"Now, you can try matching various strings against the RE ``[a-z]+``. An "
842836
"empty string shouldn't match at all, since ``+`` means 'one or more "
843837
"repetitions'. :meth:`~re.Pattern.match` should return ``None`` in this case, "
844838
"which will cause the interpreter to print no output. You can explicitly "
845839
"print the result of :meth:`!match` to make this clear. ::"
846840
msgstr ""
847-
"現在,你可以嘗試將各種字串與正規表示式 ``[a-z]+`` 進行匹配。由於 ``+`` 的含義"
848-
"「出現一次或多次」,因此空字串應該根本沒有匹配。這種情況下,:meth:`~re."
841+
"現在,你可以嘗試將各種字串與正規表示式 ``[a-z]+`` 進行匹配。因為 ``+`` "
842+
"的含義是「出現一次或多次」,所以空字串應該沒有匹配。這種情況下,:meth:`~re."
849843
"Pattern.match` 應返回 ``None`` ,進解譯器不會輸出任何內容。您可以明確地打印 "
850844
":meth:`!match` 的結果以使其清楚明白。.. code-block:: python import re "
851845
"pattern = re.compile(r'[a-z]+') match_object = pattern.match('') # The "
852846
"output of `print(match_object)` is None"
853847

854848
#: ../../howto/regex.rst:405
855-
#, fuzzy
856849
msgid ""
857850
"Now, let's try it on a string that it should match, such as ``tempo``. In "
858851
"this case, :meth:`~re.Pattern.match` will return a :ref:`match object <match-"
@@ -863,7 +856,6 @@ msgstr ""
863856
"objects>`,所以您應當將結果存入變數中以供後續使用。::"
864857

865858
#: ../../howto/regex.rst:413
866-
#, fuzzy
867859
msgid ""
868860
"Now you can query the :ref:`match object <match-objects>` for information "
869861
"about the matching string. Match object instances also have several methods "
@@ -877,7 +869,6 @@ msgid "``group()``"
877869
msgstr "``group()``"
878870

879871
#: ../../howto/regex.rst:420
880-
#, fuzzy
881872
msgid "Return the string matched by the RE"
882873
msgstr "回傳正規表示式 (RE) 所匹配的字串。"
883874

@@ -886,16 +877,14 @@ msgid "``start()``"
886877
msgstr "``start()``"
887878

888879
#: ../../howto/regex.rst:422
889-
#, fuzzy
890880
msgid "Return the starting position of the match"
891-
msgstr "傳回符合項目的起始位置"
881+
msgstr "傳回匹配項目的起始位置"
892882

893883
#: ../../howto/regex.rst:424
894884
msgid "``end()``"
895885
msgstr "``end()``"
896886

897887
#: ../../howto/regex.rst:424
898-
#, fuzzy
899888
msgid "Return the ending position of the match"
900889
msgstr "傳回匹配項目結束的位置"
901890

@@ -904,17 +893,14 @@ msgid "``span()``"
904893
msgstr "``span()``"
905894

906895
#: ../../howto/regex.rst:426
907-
#, fuzzy
908896
msgid "Return a tuple containing the (start, end) positions of the match"
909897
msgstr "回傳一個包含匹配位置 (起始,結束) 的元組"
910898

911899
#: ../../howto/regex.rst:430
912-
#, fuzzy
913900
msgid "Trying these methods will soon clarify their meaning::"
914-
msgstr "嘗試這些方法很快就會澄清它們的意思:"
901+
msgstr "嘗試這些方法能快速理解它們的意思:"
915902

916903
#: ../../howto/regex.rst:439
917-
#, fuzzy
918904
msgid ""
919905
":meth:`~re.Match.group` returns the substring that was matched by the RE. :"
920906
"meth:`~re.Match.start` and :meth:`~re.Match.end` return the starting and "
@@ -929,11 +915,10 @@ msgstr ""
929915
".start` 和 :meth:`~re.Match.end` 方法分別返回匹配開始和結束的索引,而 "
930916
":meth:`~re.Match.span` 會一次性返回起始和結束位置。 因為:meth:`~re.Pattern."
931917
"match`方法只是檢查 RE 是否從字符串開頭進行匹配,所以:meth:`!start` "
932-
"總是等於零。 但是,在模式使用的:meth:`~re.Pattern."
918+
"總是等於零。 然而,在模式使用的:meth:`~re.Pattern."
933919
"search`方法中,掃描整個字符串時匹配可能不從零位置開始。 ::"
934920

935921
#: ../../howto/regex.rst:456
936-
#, fuzzy
937922
msgid ""
938923
"In actual programs, the most common style is to store the :ref:`match object "
939924
"<match-objects>` in a variable, and then check if it was ``None``. This "
@@ -943,15 +928,13 @@ msgstr ""
943928
"存儲在一個變量中,然後檢查它是否為 ``None``。通常看起來像這樣:"
944929

945930
#: ../../howto/regex.rst:467
946-
#, fuzzy
947931
msgid ""
948932
"Two pattern methods return all of the matches for a pattern. :meth:`~re."
949933
"Pattern.findall` returns a list of matching strings::"
950934
msgstr "兩種模式方法可返回符合樣式的所有結果。 :meth:`~re.Pattern.findall` "
951935
"返回匹配字串列表:"
952936

953937
#: ../../howto/regex.rst:474
954-
#, fuzzy
955938
msgid ""
956939
"The ``r`` prefix, making the literal a raw string literal, is needed in this "
957940
"example because escape sequences in a normal \"cooked\" string literal that "
@@ -962,11 +945,10 @@ msgstr ""
962945
"在此例子中,必須使用``r``前綴來將字面值變成一個原始字串文字(r raw string "
963946
"literal),因為在正常的 \"cooked\" "
964947
"字串文字中轉義字元如果不被Python識別(相較於正則表達式),現在會產生 "
965-
":exc:`DeprecationWarning` 錯誤訊息並最終成為 :exc:`SyntaxError`. 觀看 :ref"
966-
":`the-backslash-plague`."
948+
":exc:`DeprecationWarning` 錯誤訊息並最終成為 :exc:`SyntaxError。 請見 :ref"
949+
":`the-backslash-plague`"
967950

968951
#: ../../howto/regex.rst:480
969-
#, fuzzy
970952
msgid ""
971953
":meth:`~re.Pattern.findall` has to create the entire list before it can be "
972954
"returned as the result. The :meth:`~re.Pattern.finditer` method returns a "
@@ -978,7 +960,6 @@ msgstr ""
978960
"objects>`實例:"
979961

980962
#: ../../howto/regex.rst:496
981-
#, fuzzy
982963
msgid "Module-Level Functions"
983964
msgstr "模組級函式"
984965

@@ -999,7 +980,6 @@ msgstr ""
999980
" 實例。 ::"
1000981

1001982
#: ../../howto/regex.rst:510
1002-
#, fuzzy
1003983
msgid ""
1004984
"Under the hood, these functions simply create a pattern object for you and "
1005985
"call the appropriate method on it. They also store the compiled object in a "
@@ -1010,23 +990,21 @@ msgstr ""
1010990
"譯的物件儲存在快取中,因此未來使用相同的正規表示式時不需要再次解析模式。"
1011991

1012992
#: ../../howto/regex.rst:515
1013-
#, fuzzy
1014993
msgid ""
1015994
"Should you use these module-level functions, or should you get the pattern "
1016995
"and call its methods yourself? If you're accessing a regex within a loop, "
1017996
"pre-compiling it will save a few function calls. Outside of loops, there's "
1018997
"not much difference thanks to the internal cache."
1019998
msgstr ""
1020-
"如果您正在迴圈中存取正規表示式,事前編譯可以減少一些函數呼叫。在迴圈外部由於"
1021-
"內部快取的原因,使用這些模組級別函數和直接調用它的方法沒有太大區別。"
999+
"你應該使用這些模組級函數,還是取得模式並自己呼叫?如果您正在迴圈中存取正規表"
1000+
"示式,事前編譯可以減少一些函數呼叫。在迴圈外部由於內部快取的原因,使用這些模"
1001+
"組級別函數和直接調用它的方法沒有太大區別。"
10221002

10231003
#: ../../howto/regex.rst:523
1024-
#, fuzzy
10251004
msgid "Compilation Flags"
1026-
msgstr "編譯標誌"
1005+
msgstr "編譯旗幟"
10271006

10281007
#: ../../howto/regex.rst:525
1029-
#, fuzzy
10301008
msgid ""
10311009
"Compilation flags let you modify some aspects of how regular expressions "
10321010
"work. Flags are available in the :mod:`re` module under two names, a long "
@@ -1037,27 +1015,24 @@ msgid ""
10371015
"them; ``re.I | re.M`` sets both the :const:`I` and :const:`M` flags, for "
10381016
"example."
10391017
msgstr ""
1040-
"編譯旗標可以讓你修改常規表達式的某些功能。在 :mod:`re` "
1018+
"編譯旗幟可以讓你修改常規表達式的某些功能。在 :mod:`re` "
10411019
"模組中提供了兩個名稱形式:一個是長名稱,如 "
10421020
":const:`IGNORECASE`,另一個是短名稱,如 "
10431021
":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 ` 旗幟。"
10461024

10471025
#: ../../howto/regex.rst:533
1048-
#, fuzzy
10491026
msgid ""
10501027
"Here's a table of the available flags, followed by a more detailed "
10511028
"explanation of each one."
1052-
msgstr "下表列出了可用的標誌,接下來是每個標誌的更詳細說明。"
1029+
msgstr "下表列出了可用的旗幟,接下來是每個旗幟的詳細說明。"
10531030

10541031
#: ../../howto/regex.rst:537
1055-
#, fuzzy
10561032
msgid "Flag"
1057-
msgstr "旗標"
1033+
msgstr "旗幟"
10581034

10591035
#: ../../howto/regex.rst:537
1060-
#, fuzzy
10611036
msgid "Meaning"
10621037
msgstr "意思,含義"
10631038

0 commit comments

Comments
 (0)