From d44f5032d0f53256b2d5aef505d6b593fd3cd158 Mon Sep 17 00:00:00 2001 From: Irvin Date: Wed, 16 Feb 2022 02:14:18 +0800 Subject: fix yari h2m dry run errors (zh-CN) --- .../guide/regular_expressions/assertions/index.html | 8 ++++---- .../guide/regular_expressions/character_classes/index.html | 4 ++-- .../guide/regular_expressions/groups_and_ranges/index.html | 8 ++++---- .../web/javascript/guide/regular_expressions/index.html | 4 ++-- .../regular_expressions/unicode_property_escapes/index.html | 12 ++++++------ 5 files changed, 18 insertions(+), 18 deletions(-) (limited to 'files/zh-cn/web/javascript/guide/regular_expressions') diff --git a/files/zh-cn/web/javascript/guide/regular_expressions/assertions/index.html b/files/zh-cn/web/javascript/guide/regular_expressions/assertions/index.html index 0d3757acd6..783c2985e0 100644 --- a/files/zh-cn/web/javascript/guide/regular_expressions/assertions/index.html +++ b/files/zh-cn/web/javascript/guide/regular_expressions/assertions/index.html @@ -32,8 +32,8 @@ translation_of: Web/JavaScript/Guide/Regular_Expressions/Assertions

匹配输入的开头。如果多行模式设为 true,^ 在换行符后也能立即匹配,比如 /^A/ 匹配不了 "an A" 里面的 "A",但是可以匹配 "An A" 里面第一个 "A"。

-
-

^ 出现在集合或范围开头时的含义与此不同(参见 group)。

+
+

备注:^ 出现在集合或范围开头时的含义与此不同(参见 group)。

@@ -71,8 +71,8 @@ translation_of: Web/JavaScript/Guide/Regular_Expressions/Assertions

其他断言 

-
-

提示:字符也可用作量词

+
+

备注:字符也可用作量词

diff --git a/files/zh-cn/web/javascript/guide/regular_expressions/character_classes/index.html b/files/zh-cn/web/javascript/guide/regular_expressions/character_classes/index.html index 84bf4e0090..09cf23daa0 100644 --- a/files/zh-cn/web/javascript/guide/regular_expressions/character_classes/index.html +++ b/files/zh-cn/web/javascript/guide/regular_expressions/character_classes/index.html @@ -130,8 +130,8 @@ translation_of: Web/JavaScript/Guide/Regular_Expressions/Character_Classes
  • For characters that are usually treated specially, indicates that the next character is not special and should be interpreted literally. For example, "*" is a special character that means 0 or more occurrences of the preceding character should be matched; for example, /a*/ means match 0 or more "a"s. To match * literally, precede it with a backslash; for example, /a\*/ matches "a*".
  • -
    -

    To match this character literally, escape it with itself. In other words to search for \ use /\\/.

    +
    +

    备注:To match this character literally, escape it with itself. In other words to search for \ use /\\/.

    diff --git a/files/zh-cn/web/javascript/guide/regular_expressions/groups_and_ranges/index.html b/files/zh-cn/web/javascript/guide/regular_expressions/groups_and_ranges/index.html index ac6334b3df..f0045774ff 100644 --- a/files/zh-cn/web/javascript/guide/regular_expressions/groups_and_ranges/index.html +++ b/files/zh-cn/web/javascript/guide/regular_expressions/groups_and_ranges/index.html @@ -46,8 +46,8 @@ translation_of: Web/JavaScript/Guide/Regular_Expressions/Groups_and_Ranges
    @@ -125,8 +125,8 @@ do { // Hellow 李 雷 // Hellow 韩 梅梅 -
    -

    Note: 并不是所有的浏览器都支持这个功能; 参考兼容表: compatibility table.

    +
    +

    备注: 并不是所有的浏览器都支持这个功能; 参考兼容表: compatibility table.

    技术指标

    diff --git a/files/zh-cn/web/javascript/guide/regular_expressions/index.html b/files/zh-cn/web/javascript/guide/regular_expressions/index.html index 945081c966..b8f02f1a9b 100644 --- a/files/zh-cn/web/javascript/guide/regular_expressions/index.html +++ b/files/zh-cn/web/javascript/guide/regular_expressions/index.html @@ -245,7 +245,7 @@ translation_of: Web/JavaScript/Guide/Regular_Expressions /\w\b\w/将不能匹配任何字符串,因为在一个单词中间的字符永远也不可能同时满足没有“字”字符跟随和有“字”字符跟随两种情况。

    -

    注意: JavaScript的正则表达式引擎将特定的字符集定义为“字”字符。不在该集合中的任何字符都被认为是一个断词。这组字符相当有限:它只包括大写和小写的罗马字母,十进制数字和下划线字符。不幸的是,重要的字符,例如“é”或“ü”,被视为断词。

    +

    备注: JavaScript的正则表达式引擎将特定的字符集定义为“字”字符。不在该集合中的任何字符都被认为是一个断词。这组字符相当有限:它只包括大写和小写的罗马字母,十进制数字和下划线字符。不幸的是,重要的字符,例如“é”或“ü”,被视为断词。

    @@ -543,7 +543,7 @@ console.log("The value of lastIndex is " + /d(b+)d/g.lastIndex);

    当发生/d(b+)d/g使用两个不同状态的正则表达式对象,lastIndex属性会得到不同的值。如果你需要访问一个正则表达式的属性,则需要创建一个对象初始化生成器,你应该首先把它赋值给一个变量。

    -

    使用括号的子字符串匹配

    +

    使用括号的子字符串匹配

    一个正则表达式模式使用括号,将导致相应的子匹配被记住。例如,/a(b)c /可以匹配字符串“abc”,并且记得“b”。回调这些括号中匹配的子串,使用数组元素[1],……[n]。

    diff --git a/files/zh-cn/web/javascript/guide/regular_expressions/unicode_property_escapes/index.html b/files/zh-cn/web/javascript/guide/regular_expressions/unicode_property_escapes/index.html index cf8a7207b6..64254c284c 100644 --- a/files/zh-cn/web/javascript/guide/regular_expressions/unicode_property_escapes/index.html +++ b/files/zh-cn/web/javascript/guide/regular_expressions/unicode_property_escapes/index.html @@ -9,12 +9,12 @@ translation_of: Web/JavaScript/Guide/Regular_Expressions/Unicode_Property_Escape
    {{EmbedInteractiveExample("pages/js/regexp-unicode-property-escapes.html", "taller")}}
    -
    -

    Note: 使用 Unicode 属性转义依靠 \u 标识\u 表示该字符串被视为一串 Unicode 代码点。参考 RegExp.prototype.nicode.

    +
    +

    备注:使用 Unicode 属性转义依靠 \u 标识\u 表示该字符串被视为一串 Unicode 代码点。参考 RegExp.prototype.nicode.

    -
    -

    Note: 某些 Unicode 属性比字符类(如 \w 只匹配拉丁字母 a 到 z)包含更多的字符  ,但后者浏览器兼容性更好 (截至2020 一月).

    +
    +

    备注: 某些 Unicode 属性比字符类(如 \w 只匹配拉丁字母 a 到 z)包含更多的字符  ,但后者浏览器兼容性更好 (截至2020 一月).

    句法

    @@ -48,8 +48,8 @@ translation_of: Web/JavaScript/Guide/Regular_Expressions/Unicode_Property_Escape
    很多值有同名或简写(e.g. 对应着 General_Category 属性名的属性值 Decimal_Number 可以写作 Nd, digit, 或 Decimal_Number). 大多数属性值的 Unicode属性名 和等号可以省去。如果想明确某 Unicode属性名,必须给出它的值。
    -
    -

    Note: 因为可使用的属性和值太多,这里不一一赘述,仅提供几个例子。

    +
    +

    备注: 因为可使用的属性和值太多,这里不一一赘述,仅提供几个例子。

    基本原理

    -- cgit v1.2.3-54-g00ecf

    一个否定的或被补充的字符集。也就是说,它匹配任何没有包含在括号中的字符。可以通过使用连字符来指定字符范围,但是如果连字符作为方括号中的第一个或最后一个字符出现,那么它将被视为作为普通字符包含在字符集中。例如,[^abc]和[^a-c]一样。它们最初匹配“bacon”中的“o”和“chop”中的“h”。

    -
    -

     ^ 字符也可以表示   输入的起始

    +
    +

    备注: ^ 字符也可以表示   输入的起始