diff --git a/library/re.po b/library/re.po
index d2afe1d6ea4..aa52d6c9a16 100644
--- a/library/re.po
+++ b/library/re.po
@@ -31,7 +31,7 @@ msgstr "**原始碼:**\\ :source:`Lib/re/`"
msgid ""
"This module provides regular expression matching operations similar to those "
"found in Perl."
-msgstr "此模組提供類似於 Perl 中正規表示式的配對操作。"
+msgstr "此模組提供類似於 Perl 中正規表示式的匹配操作。"
#: ../../library/re.rst:17
msgid ""
@@ -44,7 +44,7 @@ msgid ""
msgstr ""
"被搜尋的模式 (pattern) 與字串可以是 Unicode 字串 (:class:`str`),也可以是 8-"
"bit 字串 (:class:`bytes`)。然而,Unicode 字串和 8-bit 字串不能混用:也就是,"
-"你不能用 byte 模式配對 Unicode 字串,反之亦然;同樣地,替換時,用來替換的字串"
+"你不能用 byte 模式匹配 Unicode 字串,反之亦然;同樣地,替換時,用來替換的字串"
"必須與模式和搜尋字串是相同的型別 (type)。"
#: ../../library/re.rst:24
@@ -61,9 +61,9 @@ msgid ""
"future this will become a :exc:`SyntaxError`. This behaviour will happen "
"even if it is a valid escape sequence for a regular expression."
msgstr ""
-"正規表示式使用反斜線字元 (``'\\'``) 表示特別的形式,或是使用特殊字元而不呼叫"
-"它們的特殊意義。這與 Python 在字串文本 (literal) 中,為了一樣的目的使用同一個"
-"字元的目的相衝突;舉例來說,為了配對一個反斜線文字,一個人可能需要寫 ``'\\\\"
+"正規表示式使用反斜線字元 (``'\\'``) 表示特別的形式,或是使用特殊字元而不觸發"
+"它們的特殊意義。這與 Python 在字串文本 (literal) 中,為了相同目的使用同一個"
+"字元的做法相衝突;舉例來說,為了匹配一個反斜線字面值,可能需要寫 ``'\\\\"
"\\\\'`` 當作模式字串,因為正規表示式必須是 ``\\\\``,而且每個反斜線在一個普通"
"的 Python 字串文本中必須表示為 ``\\\\``。另外,請注意在 Python 的字串文本中使"
"用反斜線的任何無效跳脫序列目前會產生一個 :exc:`SyntaxWarning`,而在未來這會變"
@@ -115,6 +115,9 @@ msgid ""
"given regular expression (or if a given regular expression matches a "
"particular string, which comes down to the same thing)."
msgstr ""
+"一個正規表示式(或 RE)會指定一組匹配它的字串;這個模組的函式讓你可以檢查一個"
+"特定的字串是否匹配給定的正規表示式(或是給定的正規表示式是否匹配特定的字串,"
+"說到底是一樣的)。"
#: ../../library/re.rst:66
msgid ""
@@ -129,6 +132,13 @@ msgid ""
"consult the Friedl book [Frie09]_, or almost any textbook about compiler "
"construction."
msgstr ""
+"正規表示式可以被連接 (concatenated) 成新的正規表示式;如果 *A* 和 *B* 都是正"
+"規表示式,則 *AB* 也是一個正規表示式。一般來說,如果一個字串 *p* 與 *A* 匹"
+"配,並且另一個字串 *q* 與 *B* 匹配,則字串 *pq* 會匹配 AB。或:這在以下情況下不成立:*A*或 *B* 包"
+"含低優先順序的運算子;或 *A* 和 *B* 之間的邊界條件 (boundary conditions);或"
+"是有編號群組 (numbered group) 的參照。因此,複雜的正規表示式"
+"可以輕鬆地從此處提到的簡單原始正規表示式建立。關於正規表示式的理論和實作,請"
+"參考 Friedl 書 [Frie09]_,或任何有關建構編譯器的書籍。"
#: ../../library/re.rst:76
msgid ""
@@ -136,6 +146,8 @@ msgid ""
"further information and a gentler presentation, consult the :ref:`regex-"
"howto`."
msgstr ""
+"一個簡短的正規表示式格式解釋如下。如需更多資訊或以較平易的方式了解,請參"
+"閱 :ref:`regex-howto`。"
#: ../../library/re.rst:79
msgid ""
@@ -146,6 +158,10 @@ msgid ""
"rest of this section, we'll write RE's in ``this special style``, usually "
"without quotes, and strings to be matched ``'in single quotes'``.)"
msgstr ""
+"正規表示式可以包含特殊和一般字元。大多數一般字元,如 ``'A'``、``'a'`` 或 "
+"``'0'`` 是最簡單的正規表示式;它們只匹配它們自己。你可以連接一般字元,讓 "
+"``last`` 匹配字串 ``'last'``。(在本節的其餘部分,我們會用通常沒有引號的 "
+"``這種特殊樣式`` 來書寫正規表示式,而被匹配的字串會 ``'在單引號中'``。)"
#: ../../library/re.rst:86
msgid ""
@@ -153,6 +169,8 @@ msgid ""
"either stand for classes of ordinary characters, or affect how the regular "
"expressions around them are interpreted."
msgstr ""
+"某些字元是特殊的,像 ``'|'`` 或 ``'('``。特殊字元會代表一般字元的類別,或是"
+"會影響它們周圍正規表示式的解讀方法。"
#: ../../library/re.rst:90
msgid ""
@@ -163,10 +181,14 @@ msgid ""
"For example, the expression ``(?:a{6})*`` matches any multiple of six "
"``'a'`` characters."
msgstr ""
+"重複運算子或量詞 (quantifiers)(``*``, ``+``, ``?``, ``{m,n}`` 等)不能直接嵌"
+"套使用。這樣避免了和非貪婪修飾符號後綴 ``?`` 和其他實作中的修飾符號的模糊性。要在"
+"一個重複正規表示式內添加第二個重複,可以使用括號。例如:正規表示式 "
+"``(?:a{6})*`` 會匹配任何六的倍數個 ``a`` 字元。"
#: ../../library/re.rst:97
msgid "The special characters are:"
-msgstr ""
+msgstr "特殊字元包含:"
#: ../../library/re.rst:101 ../../library/re.rst:1663
msgid "``.``"
@@ -178,6 +200,9 @@ msgid ""
"If the :const:`DOTALL` flag has been specified, this matches any character "
"including a newline. ``(?s:.)`` matches any character regardless of flags."
msgstr ""
+"(點) 在預設模式下,這會匹配除換行符號外的任何字元。如果指定"
+"了 :const:`DOTALL` 旗標,這會匹配包含換行符號的任何字元。無論旗標為何,``(?"
+"s:.)`` 都會匹配任何字元。"
#: ../../library/re.rst:108
msgid "``^``"
@@ -188,6 +213,8 @@ msgid ""
"(Caret.) Matches the start of the string, and in :const:`MULTILINE` mode "
"also matches immediately after each newline."
msgstr ""
+"(插入符號) 會匹配字串的開頭,並且在 :const:`MULTILINE` 模式下,也會立即匹配"
+"緊接在每個換行符號之後的位置。"
#: ../../library/re.rst:114
msgid "``$``"
@@ -204,6 +231,12 @@ msgid ""
"will find two (empty) matches: one just before the newline, and one at the "
"end of the string."
msgstr ""
+"匹配字串的結尾或是字串結尾的換行符號之前,並且在 :const:`MULTILINE` 模式下會"
+"匹配換行符號之前的位置。``foo`` 會匹配 'foo' 和 'foobar',而正規表示式 "
+"``foo$`` 只會匹配 'foo'。更有趣的是,在 ``'foo1\\nfoo2\\n'`` 中搜尋 ``foo."
+"$``,正常情況下會匹配 'foo2',但是在 :const:`MULTILINE` 模式下會匹配 'foo1';"
+"在 ``'foo\\n'`` 中搜尋單一個 ``$`` 會找到兩個(空的)匹配:一個在換行符號之"
+"前,一個在字串結尾。"
#: ../../library/re.rst:125
msgid "``*``"
@@ -215,6 +248,8 @@ msgid ""
"as many repetitions as are possible. ``ab*`` will match 'a', 'ab', or 'a' "
"followed by any number of 'b's."
msgstr ""
+"使得到的正規表示式匹配前面正規表示式的 0 或多次的重複,盡可能多次的重複。"
+"``ab*`` 會匹配 'a'、'ab',或後面跟著任何數量個 'b' 的 'a'。"
#: ../../library/re.rst:132
msgid "``+``"
@@ -226,6 +261,8 @@ msgid ""
"``ab+`` will match 'a' followed by any non-zero number of 'b's; it will not "
"match just 'a'."
msgstr ""
+"使得到的正規表示式匹配前面正規表示式的 1 或多次的重複。``ab+`` 會匹配後"
+"面跟著任何非零數量個 'b' 的 'a';它不會匹配 'a'。"
#: ../../library/re.rst:139
msgid "``?``"
@@ -236,6 +273,8 @@ msgid ""
"Causes the resulting RE to match 0 or 1 repetitions of the preceding RE. "
"``ab?`` will match either 'a' or 'ab'."
msgstr ""
+"使得到的正規表示式匹配前面正規表示式的 0 或 1 次的重複。``ab?`` 會匹配 'a' "
+"或 'ab'。"
#: ../../library/re.rst:148
msgid "``*?``, ``+?``, ``??``"
@@ -251,6 +290,12 @@ msgid ""
"characters as possible will be matched. Using the RE ``<.*?>`` will match "
"only ``''``."
msgstr ""
+"量詞 (quantifier) ``'*'``、``'+'`` 和 ``'?'`` 都是 :dfn:`greedy`\\ (貪婪"
+"的);它們會盡可能地匹配更多文字。有時候這種行為不是預期的;如果正規表示式 "
+"``<.*>`` 被用來匹配 ``' b '``,它會匹配整個字串,而不只是 ``''``。在"
+"量詞後添加 ``?`` 會讓他以 :dfn:`non-greedy`\\ (非貪婪的)"
+"或 :dfn:`minimal`\\ (最小的)方式進行匹配;盡可能匹配\\ *更少*\\ 的字元。使用"
+"正規表示式 ``<.*?>`` 只會匹配到 ``''``。"
#: ../../library/re.rst:162
msgid "``*+``, ``++``, ``?+``"
@@ -272,6 +317,15 @@ msgid ""
"``x*+``, ``x++`` and ``x?+`` are equivalent to ``(?>x*)``, ``(?>x+)`` and "
"``(?>x?)`` correspondingly."
msgstr ""
+"類似於量詞 ``'*'``、``'+'`` 和 ``'?'``,添加了 ``'+'`` 的量詞也會盡可能多次"
+"的匹配。然而,不同於真正的貪婪量詞,這些量詞在接續的正規表示式匹配失敗時不允"
+"許回溯 (back-tracking)。這些量詞被稱為 :dfn:`possessive` (佔有的)量詞。例"
+"如,``a*a`` 會匹配 ``'aaaa'``,因為 ``a*`` 會匹配全部 4 個 ``'a'``,但是在遇"
+"到最後的 ``'a'`` 時,此正規表示式會回溯,以讓 ``a*`` 最終可以總共匹配 3 個 "
+"``'a'``,而第四個 ``'a'`` 會被最後的 ``'a'`` 匹配。然而,當 ``a*+a`` 被用來匹"
+"配 ``'aaaa'`` 時, ``a*+`` 會匹配全部 4 個 ``'a'``,但是當最終的 ``'a'`` 在尋"
+"找更多字元匹配失敗時,此正規表示式不能回溯並會因此匹配失敗。``x*+``、``x++`` "
+"和 ``x?+`` 分別等同於 ``(?>x*)``、``(?>x+)`` 和 ``(?>x?)``。"
#: ../../library/re.rst:184
msgid "``{m}``"
@@ -283,6 +337,8 @@ msgid ""
"fewer matches cause the entire RE not to match. For example, ``a{6}`` will "
"match exactly six ``'a'`` characters, but not five."
msgstr ""
+"指定應該恰好匹配 *m* 個前面的正規表示式;太少的匹配會造成整個正規表示式匹配失"
+"敗。例如,``a{6}`` 會匹配恰好六個 ``'a'`` 字元,但不匹配五個。"
#: ../../library/re.rst:189
msgid "``{m,n}``"
@@ -299,6 +355,11 @@ msgid ""
"not be omitted or the modifier would be confused with the previously "
"described form."
msgstr ""
+"使得到的正規表示式重複匹配前面的正規表示式 *m* 到 *n* 次,並嘗試盡可能多次的"
+"匹配。例如,``a{3,5}`` 會匹配 3 到 5 個 ``'a'`` 字元。忽略 *m* 會指定下限為"
+"零,且忽略 *n* 會指定無限大的上限。舉例來說,``a{4,}b`` 會匹配 ``'aaaab'`` 或"
+"一千個 ``'a'`` 字元加上一個 ``'b'``,但是不匹配 ``'aaab'``。不可以忽略逗號,"
+"否則量詞會與前述的形式混淆。"
#: ../../library/re.rst:198
msgid "``{m,n}?``"
@@ -312,6 +373,9 @@ msgid ""
"character string ``'aaaaaa'``, ``a{3,5}`` will match 5 ``'a'`` characters, "
"while ``a{3,5}?`` will only match 3 characters."
msgstr ""
+"使得到的正規表示式重複匹配前面的正規表示式 *m* 到 *n* 次,嘗試盡可能\\ *更少"
+"*\\ 次的匹配。這是上一個量詞的非貪婪版本。例如,對六個字元的字串 ``'aaaaaa'``,"
+"``a{3,5}`` 會匹配 5 個 ``'a'`` 字元,而 ``a{3,5}?`` 只會匹配 3 個字元。"
#: ../../library/re.rst:205
msgid "``{m,n}+``"
@@ -329,6 +393,12 @@ msgid ""
"backtracking and then the final 2 ``'a'``\\ s are matched by the final "
"``aa`` in the pattern. ``x{m,n}+`` is equivalent to ``(?>x{m,n})``."
msgstr ""
+"使得到的正規表示式重複匹配前面的正規表示式 *m* 到 *n* 次,並嘗試盡可能更多次的"
+"匹配而\\ *不*\\ 建立任何回溯點。這是上述量詞的佔有版本。例如,對六個字元的字串 "
+"``'aaaaaa'``,``a{3,5}+aa`` 嘗試匹配 5 個 ``'a'`` 字元,然後需要再 2 個 "
+"``'a'``,會需要比可用的字元更多所以失敗,而 ``a{3,5}aa`` 會捕捉到 5 個 "
+"``'a'``,然後回溯成 4 個 ``'a'``,接著最後兩個 ``'a'`` 會被模式中最後的 ``aa`` 匹"
+"配。``x{m,n}+`` 等同於 ``(?>x{m,n})``。"
#: ../../library/re.rst:222
msgid "``\\``"
@@ -340,6 +410,8 @@ msgid ""
"``'*'``, ``'?'``, and so forth), or signals a special sequence; special "
"sequences are discussed below."
msgstr ""
+"用來跳脫特殊字元(允許你匹配如 ``'*'``、``'?'`` 等字元),或是表示一個特殊序"
+"列;特殊序列將在下方討論。"
#: ../../library/re.rst:227
msgid ""
@@ -351,6 +423,11 @@ msgid ""
"repeated twice. This is complicated and hard to understand, so it's highly "
"recommended that you use raw strings for all but the simplest expressions."
msgstr ""
+"如果你沒有使用原始字串來表示正規表示式,請記得 Python 也會使用反斜線作為字串"
+"文本的跳脫序列;如果 Python 的剖析器辨認不出該跳脫序列,反斜線和接續的字元將"
+"會被包含在得到的字串中。然而,如果 Python 能辨認出該序列,反斜線應該要被重複"
+"兩次。這很複雜並且難以理解,所以強烈建議,除了最簡單的正規表示式,都應該使用"
+"原始字串。"
#: ../../library/re.rst:238
msgid "``[]``"
@@ -358,13 +435,14 @@ msgstr "``[]``"
#: ../../library/re.rst:239
msgid "Used to indicate a set of characters. In a set:"
-msgstr ""
+msgstr "用來表示一個字元集合。在一個集合中:"
#: ../../library/re.rst:241
msgid ""
"Characters can be listed individually, e.g. ``[amk]`` will match ``'a'``, "
"``'m'``, or ``'k'``."
msgstr ""
+"字元可以獨立列出,例如: ``[amk]`` 會匹配 ``'a'``、``'m'`` 或 ``'k'``。"
#: ../../library/re.rst:246
msgid ""
@@ -375,6 +453,11 @@ msgid ""
"``-`` is escaped (e.g. ``[a\\-z]``) or if it's placed as the first or last "
"character (e.g. ``[-a]`` or ``[a-]``), it will match a literal ``'-'``."
msgstr ""
+"可以透過給定兩個字元並且使用 ``'-'`` 分隔它們來表示一個範圍的字元,例如 "
+"``[a-z]`` 會匹配任何 ASCII 小寫字母,``[0-5][0-9]`` 會匹配所有從 ``00`` 到 "
+"``59`` 的兩位數字,而 ``[0-9A-Fa-f]`` 會匹配任何十六進位數字。如果 ``-`` 被跳"
+"脫了(如: ``[a\\-z]``) 或是放在第一或最後一個位置(如: ``[-a]`` 或 "
+"``[a-]``),它將會匹配字面的 ``'-'``。"
#: ../../library/re.rst:253
msgid ""
@@ -382,6 +465,8 @@ msgid ""
"For example, ``[(+*)]`` will match any of the literal characters ``'('``, "
"``'+'``, ``'*'``, or ``')'``."
msgstr ""
+"除反斜線外的特殊字元會在集合內失去它們的特殊意義。例如,``[(+*)]`` 會匹配任何"
+"字面字元 ``'('``、``'+'``、``'*'``,或 ``')'``。"
#: ../../library/re.rst:260
msgid ""
@@ -394,6 +479,12 @@ msgid ""
"not group references. Special sequences which do not match a single "
"character such as ``\\A`` and ``\\z`` are not allowed."
msgstr ""
+"反斜線可能用於跳脫集合內具有特殊意義的字元,像是 ``'-'``、``']'``、``'^'`` 和 ``'\\"
+"\\'`` 本身,或是表示一個代表單一字元的特殊序列,像是 ``\\xa0`` 或 ``\\n`` 或"
+"一個字元類別,如 ``\\w`` 或 ``\\S``\\(定義如下)。請注意,``\\b`` 代表單一"
+"個 \"backspace\" 字元,而不是在集合外代表的字元邊界,且像是 ``\\1`` 的數值跳脫"
+"總是代表八進位數字的跳脫,而不是群組的參照。不匹配單一字元的特殊序列是不被允許的,像是 "
+"``\\A`` 和 ``\\Z``。"
#: ../../library/re.rst:273
msgid ""
@@ -404,6 +495,10 @@ msgid ""
"match any character except ``'^'``. ``^`` has no special meaning if it's "
"not the first character in the set."
msgstr ""
+"不在範圍內的字元可以透過取集合的\\ :dfn:`補集 (complement) ` 匹配。如果集合中的第一個字元"
+"是 ``'^'``,所有\\ *不*\\ 在集合內的字元都會被匹配。例如, ``[^5]`` 會匹配任"
+"何除了 ``'5'`` 的字元,而 ``[^^]`` 會匹配任何除了 ``'^'`` 的字元。如果 ``^`` "
+"不是集合中的第一個字元的話,沒有特殊意義。"
#: ../../library/re.rst:280
msgid ""
@@ -412,6 +507,9 @@ msgid ""
"``[]()[{}]`` will match a right bracket, as well as left bracket, braces, "
"and parentheses."
msgstr ""
+"要在集合中匹配字面的 ``']'``,在前面加上一個反斜線,或是將它放在集合中的最前"
+"面。例如,``[()[\\]{}]`` 和 ``[]()[{}]`` 都會匹配右方括號、左方括號、花括號和"
+"括號。"
#: ../../library/re.rst:290
msgid ""
@@ -422,12 +520,18 @@ msgid ""
"or containing literal character sequences ``'--'``, ``'&&'``, ``'~~'``, and "
"``'||'``. To avoid a warning escape them with a backslash."
msgstr ""
+"未來可能會支援 `Unicode Technical Standard #18`_ 中的嵌套集合與集合操作"
+"。這會改變語法,所以為了促進這個改變,暫時會在模糊的情況下引"
+"發 :exc:`FutureWarning`。包含了以字面 ``'['`` 開頭,或是包含字面的字元序列 "
+"``'--'``、``'&&'``、``'~~'`` 和 ``'||'`` 的集合。為了避免警告,請用反斜線跳脫"
+"它們。"
#: ../../library/re.rst:300
msgid ""
":exc:`FutureWarning` is raised if a character set contains constructs that "
"will change semantically in the future."
msgstr ""
+"如果一個字元集合包含了其語義未來會被改變的結構,:exc:`FutureWarning` 會被引發。"
#: ../../library/re.rst:306
msgid "``|``"
@@ -445,6 +549,13 @@ msgid ""
"words, the ``'|'`` operator is never greedy. To match a literal ``'|'``, "
"use ``\\|``, or enclose it inside a character class, as in ``[|]``."
msgstr ""
+"``A|B``,其中 *A* 和 *B* 可以為任何正規表示式,會創造出一個匹配 *A* 或是 *B* "
+"的正規表示式。任何數量的正規表示式可以像這樣用 ``'|'`` 分隔。這也可以用在群組"
+"(見下文)中。當目標字串被掃描時,被 ``'|'`` 分隔的正規表示式會被從左到右嘗"
+"試。當一個模式完全匹配時,那條分支就被接受了。這代表一旦 *A* 匹配了,*B* 就不"
+"會被進一步測試,就算它會讓整個匹配更長。換句話說,``'|'`` 永遠不是貪婪的。要"
+"匹配字面的 ``'|'``,使用 ``\\|``,或是將它包圍在一個字元類別中,就像 "
+"``[|]``。"
#: ../../library/re.rst:320
msgid "``(...)``"
@@ -459,6 +570,10 @@ msgid ""
"``'('`` or ``')'``, use ``\\(`` or ``\\)``, or enclose them inside a "
"character class: ``[(]``, ``[)]``."
msgstr ""
+"匹配括號中的任何正規表示式,並且表示一個群組的開始和結束;群組的內容可以在執"
+"行匹配後取得,並且在後續的字串可以使用 ``\\number`` 特殊序列來匹配,如下所述。"
+"要匹配字面的 ``'('`` 或 ``')'``,用 ``\\(`` 或 ``\\)``,或是將它們包圍在一個"
+"字元類別中: ``[(``、``[)]``。"
#: ../../library/re.rst:329
msgid "``(?...)``"
@@ -472,6 +587,9 @@ msgid ""
"do not create a new group; ``(?P...)`` is the only exception to this "
"rule. Following are the currently supported extensions."
msgstr ""
+"這是一個擴充表示法(否則一個 ``'?'`` 接著一個 ``'('`` 是沒有意義的)。"
+"``'?'`` 後面的第一個字元決定了這個結構的意義和進一步的語法。擴充通常不會創造"
+"新的群組;``(?P...)`` 是這個規則的唯一例外。以下是目前支援的擴充。"
#: ../../library/re.rst:336
msgid "``(?aiLmsux)``"
@@ -483,34 +601,36 @@ msgid ""
"``'s'``, ``'u'``, ``'x'``.) The group matches the empty string; the letters "
"set the corresponding flags for the entire regular expression:"
msgstr ""
+"(集合 ``'a'``、``'i'``、``'L'``、``'m'``、``'s'``、``'u'``、 ``'x'`` 中的一"
+"或多個字母。)該群組會匹配空字串;這些字母會為整個正規表示式設定對應的旗標。"
#: ../../library/re.rst:342 ../../library/re.rst:374
msgid ":const:`re.A` (ASCII-only matching)"
-msgstr ""
+msgstr ":const:`re.A`\\ (僅限 ASCII 字元匹配)"
#: ../../library/re.rst:343 ../../library/re.rst:375
msgid ":const:`re.I` (ignore case)"
-msgstr ""
+msgstr ":const:`re.I`\\ (忽略大小寫)"
#: ../../library/re.rst:344 ../../library/re.rst:376
msgid ":const:`re.L` (locale dependent)"
-msgstr ""
+msgstr ":const:`re.L`\\ (依賴區域設定)"
#: ../../library/re.rst:345 ../../library/re.rst:377
msgid ":const:`re.M` (multi-line)"
-msgstr ""
+msgstr ":const:`re.M`\\ (多行)"
#: ../../library/re.rst:346 ../../library/re.rst:378
msgid ":const:`re.S` (dot matches all)"
-msgstr ""
+msgstr ":const:`re.S`\\ (點會匹配所有字元)"
#: ../../library/re.rst:347 ../../library/re.rst:379
msgid ":const:`re.U` (Unicode matching)"
-msgstr ""
+msgstr ":const:`re.U`\\ (匹配 Unicode)"
#: ../../library/re.rst:348 ../../library/re.rst:380
msgid ":const:`re.X` (verbose)"
-msgstr ""
+msgstr ":const:`re.X`\\ (詳盡模式)"
#: ../../library/re.rst:350
msgid ""
@@ -519,10 +639,13 @@ msgid ""
"passing a *flag* argument to the :func:`re.compile` function. Flags should "
"be used first in the expression string."
msgstr ""
+"(這些旗標在 :ref:`contents-of-module-re` 中說明。)如果你想將旗標當作正規表"
+"示式的一部分,而不是傳遞一個 *flag* 引數給 :func:`re.compile` 函式的話,這會有"
+"幫助。旗標應該首先在正規表示式字串中使用。"
#: ../../library/re.rst:356
msgid "This construction can only be used at the start of the expression."
-msgstr ""
+msgstr "此結構只能用於正規表示式的開頭。"
#: ../../library/re.rst:361
msgid "``(?:...)``"
@@ -535,6 +658,8 @@ msgid ""
"*cannot* be retrieved after performing a match or referenced later in the "
"pattern."
msgstr ""
+"一個非捕捉版本的普通括號。匹配括號內的任何正規表示式,但是被群組匹配到的子字"
+"串\\ *不能*\\ 在執行匹配後被取得,或是在之後的模式中被參照。"
#: ../../library/re.rst:367
msgid "``(?aiLmsux-imsx:...)``"
@@ -547,10 +672,14 @@ msgid ""
"more letters from the ``'i'``, ``'m'``, ``'s'``, ``'x'``.) The letters set "
"or remove the corresponding flags for the part of the expression:"
msgstr ""
+"(集合 ``'a'``、``'i'``、``'L'``、``'m'``、``'s'``、``'u'``、``'x'`` 中的零或"
+"多個字母,選擇性地接著 ``'-'``,並接著一或多個 ``'i'``、``'m'``、``'s'``、"
+"``'x'`` 中的字母。)該字母集合會為那一部分的正規表示式設定或是移除對應的旗"
+"標。"
#: ../../library/re.rst:382
msgid "(The flags are described in :ref:`contents-of-module-re`.)"
-msgstr ""
+msgstr "(這些旗標在 :ref:`contents-of-module-re` 中說明。)"
#: ../../library/re.rst:384
msgid ""
@@ -564,10 +693,17 @@ msgid ""
"effect for the narrow inline group, and the original matching mode is "
"restored outside of the group."
msgstr ""
+"字母 ``'a'``、``'L'`` 和 ``'u'`` 在被當作嵌入旗標時是互斥的,所以它們不能被組"
+"合使用或是接在 ``'-'`` 後面。相反地,當它們其中一個出現在嵌入群組時,它會覆蓋"
+"括號中群組的匹配模式。在 Unicode 模式中,``(?a:...)`` 會切換到僅匹配 ASCII 模"
+"式,且 ``(?u:...)`` 會切換到 Unicode 匹配模式(預設)。在位元組模式,``(?"
+"L:...)`` 會切換到依賴區域設定 (locale) 的匹配,且 ``(?a:...)`` 會切換到僅匹"
+"配 ASCII 模式(預設)。這個覆蓋只會在嵌入群組中作用,而原本的匹配模式會在群組"
+"外恢復。"
#: ../../library/re.rst:396
msgid "The letters ``'a'``, ``'L'`` and ``'u'`` also can be used in a group."
-msgstr ""
+msgstr "字母 ``'a'``、``'L'`` 和 ``'u'`` 也可以被用在群組中。"
#: ../../library/re.rst:399
msgid "``(?>...)``"
@@ -586,6 +722,13 @@ msgid ""
"Atomic Group, and there is no stack point before it, the entire expression "
"would thus fail to match."
msgstr ""
+"嘗試將 ``...`` 視為獨立的正規表示式進行匹配,且若成功則會繼續匹配"
+"後續的模式。如果後續模式匹配失敗,則回溯堆疊 (stack) 只能還原 (unwound) 到 "
+"``(?>...)`` *之前*,因為一旦退出了,這個也叫做\\ :dfn:`原子群組` (atomic "
+"group) 的正規表示式,已經丟棄了它自己的所有回溯點 (stack point)。因此,``(?"
+">.*).`` 永遠不會匹配任何內容,因為 ``.*`` 會先盡可能匹配所有的字元,接著沒有任"
+"何剩餘內容可以匹配,導致最終的 ``.`` 匹配失敗。因為原子群組中沒有儲存回溯點,"
+"而且群組之前也沒有回溯點,整個正規表示式都會匹配失敗。"
#: ../../library/re.rst:416
msgid "``(?P...)``"
@@ -600,6 +743,10 @@ msgid ""
"a regular expression. A symbolic group is also a numbered group, just as if "
"the group were not named."
msgstr ""
+"類似於一般的括號,但是這個群組匹配的子字串可以透過符號群組名稱 *name* 存取。"
+"群組名稱必須是有效的 Python 識別字 (identifier),並且在 :class:`bytes` 模式"
+"中,它們只能包含 ASCII 範圍中的位元組。每個群組名稱在正規表示式中只能定義一"
+"次。一個符號群組同時也是一個編號群組,只是等同於該群組沒有名稱。"
#: ../../library/re.rst:424
msgid ""
@@ -607,22 +754,25 @@ msgid ""
"P['\"]).*?(?P=quote)`` (i.e. matching a string quoted with either "
"single or double quotes):"
msgstr ""
+"命名群組 (named groups) 可以在三種情境下被參照。如果該模式是 ``(?"
+"P['\"]).*?(?P=quote)``\\ (也就是匹配一個用單引號或雙引號包圍的字"
+"串):"
#: ../../library/re.rst:429
msgid "Context of reference to group \"quote\""
-msgstr ""
+msgstr "對 \"quote\" 群組參照的情境"
#: ../../library/re.rst:429
msgid "Ways to reference it"
-msgstr ""
+msgstr "參照方式"
#: ../../library/re.rst:431
msgid "in the same pattern itself"
-msgstr ""
+msgstr "在同一個模式中"
#: ../../library/re.rst:431
msgid "``(?P=quote)`` (as shown)"
-msgstr ""
+msgstr "``(?P=quote)``\\ (如上例所示)"
#: ../../library/re.rst:432 ../../library/re.rst:439
msgid "``\\1``"
@@ -630,7 +780,7 @@ msgstr "``\\1``"
#: ../../library/re.rst:434
msgid "when processing match object *m*"
-msgstr ""
+msgstr "在處理匹配物件 *m* 時"
#: ../../library/re.rst:434
msgid "``m.group('quote')``"
@@ -638,11 +788,11 @@ msgstr "``m.group('quote')``"
#: ../../library/re.rst:435
msgid "``m.end('quote')`` (etc.)"
-msgstr ""
+msgstr "``m.end('quote')``\\ (等)"
#: ../../library/re.rst:437
msgid "in a string passed to the *repl* argument of ``re.sub()``"
-msgstr ""
+msgstr "在被當成 ``re.sub()`` 的 *repl* 引數傳入的字串中"
#: ../../library/re.rst:437
msgid "``\\g``"
@@ -657,6 +807,8 @@ msgid ""
"In :class:`bytes` patterns, group *name* can only contain bytes in the ASCII "
"range (``b'\\x00'``-``b'\\x7f'``)."
msgstr ""
+"在 :class:`bytes` 模式中,群組的\\ *名稱*\\ 只能包含 ASCII 範圍中的位元組"
+"(``b'\\x00'``-``b'\\x7f'``)。"
#: ../../library/re.rst:448
msgid "``(?P=name)``"
@@ -667,6 +819,8 @@ msgid ""
"A backreference to a named group; it matches whatever text was matched by "
"the earlier group named *name*."
msgstr ""
+"對於命名群組的反向參照;它會匹配任何之前被命名為 *name* 的群組所匹配到的文"
+"字。"
#: ../../library/re.rst:454
msgid "``(?#...)``"
@@ -674,7 +828,7 @@ msgstr "``(?#...)``"
#: ../../library/re.rst:455
msgid "A comment; the contents of the parentheses are simply ignored."
-msgstr ""
+msgstr "一個註解;括號中的內容會被忽略。"
#: ../../library/re.rst:459
msgid "``(?=...)``"
@@ -686,6 +840,9 @@ msgid ""
"This is called a :dfn:`lookahead assertion`. For example, ``Isaac (?"
"=Asimov)`` will match ``'Isaac '`` only if it's followed by ``'Asimov'``."
msgstr ""
+"如果字串接下來可以匹配 ``...`` 才會成功匹配,但是並不會消耗任何字串。這被稱"
+"作 :dfn:`lookahead assertion`。例如,``Isaac (?=Asimov)`` 只在後面跟著 "
+"``'Asimov'`` 時才會匹配 ``'Isaac '``。"
#: ../../library/re.rst:466
msgid "``(?!...)``"
@@ -697,6 +854,9 @@ msgid ""
"assertion`. For example, ``Isaac (?!Asimov)`` will match ``'Isaac '`` only "
"if it's *not* followed by ``'Asimov'``."
msgstr ""
+"如果字串接下來不匹配 ``...``,才會成功匹配。這是一個\\ :dfn:`負向預查斷言 (negative "
+"lookahead assertion) `。例如,``Isaac (?!Asimov)`` "
+"只在後面\\ *不*\\ 跟著 ``'Asimov'`` 時才會匹配 ``'Isaac '``。"
#: ../../library/re.rst:473
msgid "``(?<=...)``"
@@ -715,14 +875,21 @@ msgid ""
"will most likely want to use the :func:`search` function rather than "
"the :func:`match` function:"
msgstr ""
+"如果目前位置前方的字串能夠匹配 ``...``,可以成功匹配。這叫做\\ :dfn:`正向回查斷言 (positive "
+"lookbehind assertion) `。``(?<=abc)def`` 會在 ``'abcdef'`` 中找到一個匹配,"
+"因為回查會向後 3 個字元,並檢查是否能匹配包含的模式。這個包含的模式只"
+"能匹配固定長度的字串,代表 ``abc`` 或 ``a|b`` 是被允許的,但是 ``a*`` 和 "
+"``a{3,4}`` 不被允許。請注意,使用正向回查斷言開頭的模式不"
+"會匹配被搜尋字串的開頭;你更可能想要使用 :func:`search` 函式而不"
+"是 :func:`match` 函式:"
#: ../../library/re.rst:489
msgid "This example looks for a word following a hyphen:"
-msgstr ""
+msgstr "這個範例在尋找連字號後的單字:"
#: ../../library/re.rst:495
msgid "Added support for group references of fixed length."
-msgstr ""
+msgstr "新增固定長度群組參照的支援。"
#: ../../library/re.rst:500
msgid "``(?`。類似於正向回查斷言,包含的模式只"
+"能匹配固定長度的字串。使用負向回查斷言開頭的模式可以匹配被搜尋字串的開頭。"
#: ../../library/re.rst:510
msgid "``(?(id/name)yes-pattern|no-pattern)``"
@@ -750,12 +920,19 @@ msgid ""
"``''`` as well as ``'user@host.com'``, but not with "
"``''``."
msgstr ""
+"如果給定 *id* 或 *name* 的群組存在,會嘗試匹配 ``yes-pattern``,否則會匹配 "
+"``no-pattern``。``no-pattern`` 是可選的並且可以省略。例如,``(<)?(\\w+@\\w+"
+"(?:\\.\\w+)+)(?(1)>|$)`` 是一個不好的電子郵件匹配模式,它會匹配 "
+"``''`` 和 ``'user@host.com'``,但不會匹配 "
+"``''``。"
#: ../../library/re.rst:518
msgid ""
"Group *id* can only contain ASCII digits. In :class:`bytes` patterns, group "
"*name* can only contain bytes in the ASCII range (``b'\\x00'``-``b'\\x7f'``)."
msgstr ""
+"群組 *id* 只能包含 ASCII 數字。在 :class:`bytes` 模式中,群組 *name* 只能包"
+"含 ASCII 範圍中的位元組 (``b'\\x00'``-``b'\\x7f'``)。"
#: ../../library/re.rst:526
msgid ""
@@ -764,6 +941,9 @@ msgid ""
"then the resulting RE will match the second character. For example, ``\\$`` "
"matches the character ``'$'``."
msgstr ""
+"特殊序列由 ``'\\'`` 和下列清單的一個字元組成。如果序列中的一般字元不是一個 "
+"ASCII 數字或是一個 ASCII 字母,那麼產生的的正規表示式會匹配第二個字元。例如,"
+"``\\$`` 會匹配字元 ``'$'``。"
#: ../../library/re.rst:533
msgid "``\\number``"
@@ -780,6 +960,12 @@ msgid ""
"*number*. Inside the ``'['`` and ``']'`` of a character class, all numeric "
"escapes are treated as characters."
msgstr ""
+"匹配相同數字群組中的內容。群組會從 1 開始編號。例如,``(.+) \\1`` 會匹配 "
+"``'the the'`` 或 ``'55 55'``,但不會匹配 ``'thethe'``\\ (注意群組後的空格)。這"
+"個特殊序列只能用來匹配前 99 個群組之一。如果 *number* 的第一位數是 0,或是 "
+"*number* 有 3 個八進位位數,它就不會被解讀成匹配群組,而是解讀成八進位數值 "
+"*number* 的字元。在一個字元類別中的 ``'['`` 和 ``']'``,所有數值的跳脫字元都"
+"會被當作字元。"
#: ../../library/re.rst:545
msgid "``\\A``"
@@ -787,7 +973,7 @@ msgstr "``\\A``"
#: ../../library/re.rst:546
msgid "Matches only at the start of the string."
-msgstr ""
+msgstr "只在字串的開頭匹配。"
#: ../../library/re.rst:550
msgid "``\\b``"
@@ -802,6 +988,11 @@ msgid ""
"means that ``r'\\bat\\b'`` matches ``'at'``, ``'at.'``, ``'(at)'``, and "
"``'as at ay'`` but not ``'attempt'`` or ``'atlas'``."
msgstr ""
+"匹配空字串,但是只在一個單字的開頭或結尾。一個單字被定義為一個單字字元的序"
+"列。請注意在正式情況下,``\\b`` 被定義為 ``\\w`` 和一個 ``\\W`` 字元的邊界"
+"(或是反之亦然),或是在 ``\\w`` 和字串的開頭或結尾之間。這表示 "
+"``r'\\bat\\b'`` 會匹配 ``'at'``、``'at.'``、``'(at)'``,以及 ``'as at ay'``,"
+"但是不匹配 ``'attempt'`` 或 ``'atlas'``。"
#: ../../library/re.rst:559
msgid ""
@@ -810,12 +1001,16 @@ msgid ""
"the :py:const:`~re.ASCII` flag. Word boundaries are determined by the "
"current locale if the :py:const:`~re.LOCALE` flag is used."
msgstr ""
+"預設的單字字元在 Unicode(字串)模式中,是 Unicode 字母數字 (alphanumerics) 和底線,但是這可"
+"以透過使用 :py:const:`~re.ASCII` 旗標來改變。如果使用"
+"了 :py:const:`~re.LOCALE` 旗標,單字的邊界會由目前的區域設定決定。"
#: ../../library/re.rst:567
msgid ""
"Inside a character range, ``\\b`` represents the backspace character, for "
"compatibility with Python's string literals."
msgstr ""
+"在字元範圍中,為了與 Python 的字串文本的相容性,``\\b`` 表示 backspace 字元。"
#: ../../library/re.rst:572
msgid "``\\B``"
@@ -831,10 +1026,16 @@ msgid ""
"using the :py:const:`~re.ASCII` flag. Word boundaries are determined by the "
"current locale if the :py:const:`~re.LOCALE` flag is used."
msgstr ""
+"匹配空字串,但是只有在空字串\\ *不*\\ 在單字的開頭或結尾時匹配。這表示 "
+"``r'at\\B'`` 會匹配 ``'athens'``、``'atom'``、``'attorney'``,但是不匹配 "
+"``'at'``、``'at.'`` 或 ``'at!'``。``\\B`` 是 ``\\b`` 的相反,所以 Unicode"
+"(字串)模式中的單字字元是 Unicode 字母、數字或底線,不過這可以透過使"
+"用 :py:const:`~re.ASCII` 旗標來改變。如果使用了 :py:const:`~re.LOCALE` 旗標,"
+"單字的邊界會由目前的區域設定決定。"
#: ../../library/re.rst:584
msgid "``\\B`` now matches empty input string."
-msgstr ""
+msgstr "``\\B`` 現在會匹配空的輸入字串。"
#: ../../library/re.rst:589
msgid "``\\d``"
@@ -842,7 +1043,7 @@ msgstr "``\\d``"
#: ../../library/re.rst:590 ../../library/re.rst:614 ../../library/re.rst:636
msgid "For Unicode (str) patterns:"
-msgstr ""
+msgstr "對於 Unicode(字串)模式:"
#: ../../library/re.rst:591
msgid ""
@@ -850,20 +1051,22 @@ msgid ""
"character category `[Nd]`__). This includes ``[0-9]``, and also many other "
"digit characters."
msgstr ""
+"匹配任何 Unicode 十進位數字(也就是 Unicode 字元類別中的任何字元 `[Nd]`__)。"
+"這包含了 ``[0-9]``,以及許多許多其他的數字字元。"
#: ../../library/re.rst:595
msgid "Matches ``[0-9]`` if the :py:const:`~re.ASCII` flag is used."
-msgstr ""
+msgstr "如果使用了 :py:const:`~re.ASCII` 旗標,匹配 ``[0-9]``。"
#: ../../library/re.rst:599 ../../library/re.rst:621 ../../library/re.rst:644
msgid "For 8-bit (bytes) patterns:"
-msgstr ""
+msgstr "對於 8 位元(位元組)模式:"
#: ../../library/re.rst:600
msgid ""
"Matches any decimal digit in the ASCII character set; this is equivalent to "
"``[0-9]``."
-msgstr ""
+msgstr "匹配任何 ASCII 字元集合中的十進位數字;這等同於 ``[0-9]``。"
#: ../../library/re.rst:605
msgid "``\\D``"
@@ -873,11 +1076,11 @@ msgstr "``\\D``"
msgid ""
"Matches any character which is not a decimal digit. This is the opposite of "
"``\\d``."
-msgstr ""
+msgstr "匹配任何不是十進位數字的字元。這是 ``\\d`` 的相反。"
#: ../../library/re.rst:609
msgid "Matches ``[^0-9]`` if the :py:const:`~re.ASCII` flag is used."
-msgstr ""
+msgstr "如果使用了 :py:const:`~re.ASCII` 旗標,會匹配 ``[^0-9]``。"
#: ../../library/re.rst:613
msgid "``\\s``"
@@ -890,17 +1093,20 @@ msgid ""
"many other characters, for example the non-breaking spaces mandated by "
"typography rules in many languages."
msgstr ""
+"匹配 Unicode 空格字元(在 :py:meth:`str.isspace` 中定義)。包含 "
+"``[ \\t\\n\\r\\f\\v]``,還有許多其他的字元,例如許多語言的排版規則中要求的不"
+"換行空格。"
#: ../../library/re.rst:619
msgid ""
"Matches ``[ \\t\\n\\r\\f\\v]`` if the :py:const:`~re.ASCII` flag is used."
-msgstr ""
+msgstr "如果使用了 :py:const:`~re.ASCII` 旗標,匹配 ``[ \\t\\n\\r\\f\\v]``。"
#: ../../library/re.rst:622
msgid ""
"Matches characters considered whitespace in the ASCII character set; this is "
"equivalent to ``[ \\t\\n\\r\\f\\v]``."
-msgstr ""
+msgstr "匹配 ASCII 字元集合中認定的空格;這等同於 ``[ \\t\\n\\r\\f\\v]``。"
#: ../../library/re.rst:627
msgid "``\\S``"
@@ -910,12 +1116,12 @@ msgstr "``\\S``"
msgid ""
"Matches any character which is not a whitespace character. This is the "
"opposite of ``\\s``."
-msgstr ""
+msgstr "匹配任何不是空格字元的字元。這是 ``\\s`` 的相反。"
#: ../../library/re.rst:631
msgid ""
"Matches ``[^ \\t\\n\\r\\f\\v]`` if the :py:const:`~re.ASCII` flag is used."
-msgstr ""
+msgstr "如果使用了 :py:const:`~re.ASCII` 旗標,匹配 ``[^ \\t\\n\\r\\f\\v]``。"
#: ../../library/re.rst:635
msgid "``\\w``"
@@ -927,10 +1133,12 @@ msgid ""
"characters (as defined by :py:meth:`str.isalnum`), as well as the underscore "
"(``_``)."
msgstr ""
+"匹配 Unicode 單字字元;這包含全部 Unicode 的字母數字字元"
+"(在 :py:meth:`str.isalnum` 中定義),以及底線 (``_``)。"
#: ../../library/re.rst:642
msgid "Matches ``[a-zA-Z0-9_]`` if the :py:const:`~re.ASCII` flag is used."
-msgstr ""
+msgstr "如果使用了 :py:const:`~re.ASCII` 旗標,匹配 ``[a-zA-Z0-9_]``。"
#: ../../library/re.rst:645
msgid ""
@@ -939,6 +1147,9 @@ msgid ""
"used, matches characters considered alphanumeric in the current locale and "
"the underscore."
msgstr ""
+"匹配在 ASCII 字元集合中被認定為字母或數字的字元;這等同於 ``[a-zA-Z0-9_]``。"
+"如果使用了 :py:const:`~re.LOCALE` 旗標,會匹配目前區域設定中被認定為字母或數"
+"字的字元,以及底線。"
#: ../../library/re.rst:652
msgid "``\\W``"
@@ -950,16 +1161,20 @@ msgid ""
"``\\w``. By default, matches non-underscore (``_``) characters for "
"which :py:meth:`str.isalnum` returns ``False``."
msgstr ""
+"匹配任何不是單字字元的字元。這是 ``\\w`` 的相反。預設情況下,會匹配任何不是底"
+"線 (``_``),並且 :py:meth:`str.isalnum` 會回傳 ``False`` 的字元。"
#: ../../library/re.rst:658
msgid "Matches ``[^a-zA-Z0-9_]`` if the :py:const:`~re.ASCII` flag is used."
-msgstr ""
+msgstr "如果使用了 :py:const:`~re.ASCII` 旗標,會匹配 ``[^a-zA-Z0-9_]``。"
#: ../../library/re.rst:660
msgid ""
"If the :py:const:`~re.LOCALE` flag is used, matches characters which are "
"neither alphanumeric in the current locale nor the underscore."
msgstr ""
+"如果使用了 :py:const:`~re.LOCALE` 旗標,會匹配目前區域中不是字母數字,也不是"
+"底線的字元。"
#: ../../library/re.rst:667
msgid "``\\z``"
@@ -967,7 +1182,7 @@ msgstr "``\\z``"
#: ../../library/re.rst:668
msgid "Matches only at the end of the string."
-msgstr ""
+msgstr "只在字串的結尾匹配。"
#: ../../library/re.rst:672
msgid "``\\Z``"
@@ -982,6 +1197,8 @@ msgid ""
"Most of the :ref:`escape sequences ` supported by Python "
"string literals are also accepted by the regular expression parser::"
msgstr ""
+"大多數 Python 的字串文本支援的\\ :ref:`跳脫序列 `\\ 也能被"
+"正規表示式剖析器接受: ::"
#: ../../library/re.rst:692
msgid ""
@@ -998,6 +1215,7 @@ msgid ""
"(Note that ``\\b`` is used to represent word boundaries, and means "
"\"backspace\" only inside character classes.)"
msgstr ""
+"(請注意 ``\\b`` 被用來表示單字邊界,並且只在字元類別內表示 \"backspace\"。)"
#: ../../library/re.rst:699
msgid ""
@@ -1005,6 +1223,9 @@ msgid ""
"Unicode (str) patterns. In bytes patterns they are errors. Unknown escapes "
"of ASCII letters are reserved for future use and treated as errors."
msgstr ""
+"``'\\u'``、``'\\U'``,和 ``'\\N'`` 跳脫序列只會在 Unicode(字串)模式中可辨"
+"認。在位元組模式中,它們是錯誤。未知的跳脫 ASCII 字母被保留於未來使用,並且會"
+"被當成錯誤。"
#: ../../library/re.rst:705
msgid ""
@@ -1013,15 +1234,18 @@ msgid ""
"Otherwise, it is a group reference. As for string literals, octal escapes "
"are always at most three digits in length."
msgstr ""
+"八進位數的跳脫被有限地包含在內。如果第一個數字是一個 0,或是如果有三個八進位"
+"數字,它就會被當作是一個八進位跳脫。否則,它是一個群組參照。至於字串文本,八"
+"進位跳脫最多只能包含三個數字。"
#: ../../library/re.rst:710
msgid "The ``'\\u'`` and ``'\\U'`` escape sequences have been added."
-msgstr ""
+msgstr "``'\\u'`` 和 ``'\\U'`` 跳脫序列已經被添加。"
#: ../../library/re.rst:713
msgid ""
"Unknown escapes consisting of ``'\\'`` and an ASCII letter now are errors."
-msgstr ""
+msgstr "由 ``'\\'`` 和一個 ASCII 字母組成的未知跳脫現在會是錯誤。"
#: ../../library/re.rst:716
msgid ""
@@ -1029,6 +1253,8 @@ msgid ""
"string literals, it expands to the named Unicode character (e.g. ``'\\N{EM "
"DASH}'``)."
msgstr ""
+":samp:`'\\\\N\\\\{{name}\\\\}'` 跳脫序列已經被添加。如同字串文本,它會展開成"
+"命名的 Unicode 字元(如 ``'\\N{EM DASH}'``)。"
#: ../../library/re.rst:724
msgid "Module Contents"
@@ -1254,12 +1480,12 @@ msgid ""
"Values can be any of the `flags`_ variables, combined using bitwise OR (the "
"``|`` operator)."
msgstr ""
-"可以透過指定 *flags* 值來修改運算式的行為,值可以是任何 `flags`_ 變數,使用位"
-"元 OR(bitwise OR、``|`` 運算子)組合。"
+"可以透過指定 *flags* 值來修改正規表示式的行為,值可以是任何 `flags`_ 變數,使"
+"用位元 OR(bitwise OR、``|`` 運算子)組合。"
#: ../../library/re.rst:903
msgid "The sequence ::"
-msgstr "順序為: ::"
+msgstr "序列為: ::"
#: ../../library/re.rst:905
msgid ""
@@ -1633,7 +1859,7 @@ msgid ""
"in it. For example::"
msgstr ""
"對 *pattern* 中的特殊字元進行跳脫。如果你想要匹配其中可能包含正規表示式元字"
-"元 (metacharacter) 的任意文本字串,這會非常有用。例如: ::"
+"元 (metacharacter) 的任何文本字串,這會非常有用。例如: ::"
#: ../../library/re.rst:1163
msgid ""