aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/guide/regular_expressions
diff options
context:
space:
mode:
authorIrvin <irvinfly@gmail.com>2022-02-16 02:14:18 +0800
committerIrvin <irvinfly@gmail.com>2022-02-16 02:35:54 +0800
commitd44f5032d0f53256b2d5aef505d6b593fd3cd158 (patch)
tree4b585f4be9c9a2712664ad10e7acf62c83fff51f /files/zh-cn/web/javascript/guide/regular_expressions
parentf45e9e070c93ebbd83d488bdd775987a4d75c201 (diff)
downloadtranslated-content-d44f5032d0f53256b2d5aef505d6b593fd3cd158.tar.gz
translated-content-d44f5032d0f53256b2d5aef505d6b593fd3cd158.tar.bz2
translated-content-d44f5032d0f53256b2d5aef505d6b593fd3cd158.zip
fix yari h2m dry run errors (zh-CN)
Diffstat (limited to 'files/zh-cn/web/javascript/guide/regular_expressions')
-rw-r--r--files/zh-cn/web/javascript/guide/regular_expressions/assertions/index.html8
-rw-r--r--files/zh-cn/web/javascript/guide/regular_expressions/character_classes/index.html4
-rw-r--r--files/zh-cn/web/javascript/guide/regular_expressions/groups_and_ranges/index.html8
-rw-r--r--files/zh-cn/web/javascript/guide/regular_expressions/index.html4
-rw-r--r--files/zh-cn/web/javascript/guide/regular_expressions/unicode_property_escapes/index.html12
5 files changed, 18 insertions, 18 deletions
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
<td>
<p>匹配输入的开头。如果多行模式设为 true,<code>^</code> 在换行符后也能立即匹配,比如 <code>/^A/</code> 匹配不了 "an A" 里面的 "A",但是可以匹配 "An A" 里面第一个 "A"。</p>
- <div class="blockIndicator note">
- <p><code>^</code> 出现在集合或范围开头时的含义与此不同(参见 <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Groups_and_Ranges">group</a>)。</p>
+ <div class="note">
+ <p><strong>备注:</strong><code>^</code> 出现在集合或范围开头时的含义与此不同(参见 <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Groups_and_Ranges">group</a>)。</p>
</div>
</td>
</tr>
@@ -71,8 +71,8 @@ translation_of: Web/JavaScript/Guide/Regular_Expressions/Assertions
<h3 id="其他断言">其他断言 </h3>
-<div class="blockIndicator note">
-<p>提示:<code>?</code>字符也可用作量词</p>
+<div class="note">
+<p><strong>备注:</strong><code>?</code>字符也可用作量词</p>
</div>
<table class="standard-table">
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
<li>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, <code>/a*/</code> means match 0 or more "a"s. To match <code>*</code> literally, precede it with a backslash; for example, <code>/a\*/</code> matches "a*".</li>
</ul>
- <div class="blockIndicator note">
- <p>To match this character literally, escape it with itself. In other words to search for <code>\</code> use <code>/\\/</code>.</p>
+ <div class="note">
+ <p><strong>备注:</strong>To match this character literally, escape it with itself. In other words to search for <code>\</code> use <code>/\\/</code>.</p>
</div>
</td>
</tr>
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
<td>
<p>一个否定的或被补充的字符集。也就是说,它匹配任何没有包含在括号中的字符。可以通过使用连字符来指定字符范围,但是如果连字符作为方括号中的第一个或最后一个字符出现,那么它将被视为作为普通字符包含在字符集中。例如,[^abc]和[^a-c]一样。它们最初匹配“bacon”中的“o”和“chop”中的“h”。</p>
- <div class="blockIndicator note">
- <p> ^ 字符也可以表示   <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Boundaries">输入的起始</a></p>
+ <div class="note">
+ <p><strong>备注:</strong> ^ 字符也可以表示   <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Boundaries">输入的起始</a></p>
</div>
</td>
</tr>
@@ -125,8 +125,8 @@ do {
// Hellow 李 雷
// Hellow 韩 梅梅</pre>
-<div class="blockIndicator note">
-<p><strong>Note:</strong> 并不是所有的浏览器都支持这个功能; 参考兼容表: <a href="/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Browser_compatibility">compatibility table</a>.</p>
+<div class="note">
+<p><strong>备注:</strong> 并不是所有的浏览器都支持这个功能; 参考兼容表: <a href="/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Browser_compatibility">compatibility table</a>.</p>
</div>
<h2 id="技术指标">技术指标</h2>
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/将不能匹配任何字符串,因为在一个单词中间的字符永远也不可能同时满足没有“字”字符跟随和有“字”字符跟随两种情况。</p>
<div class="note">
- <p><strong>注意:</strong> JavaScript的正则表达式引擎将<a href="http://www.ecma-international.org/ecma-262/5.1/#sec-15.10.2.6">特定的字符集</a>定义为“字”字符。不在该集合中的任何字符都被认为是一个断词。这组字符相当有限:它只包括大写和小写的罗马字母,十进制数字和下划线字符。不幸的是,重要的字符,例如“<a></a>é”或“ü”,被视为断词。</p>
+ <p><strong>备注:</strong> JavaScript的正则表达式引擎将<a href="http://www.ecma-international.org/ecma-262/5.1/#sec-15.10.2.6">特定的字符集</a>定义为“字”字符。不在该集合中的任何字符都被认为是一个断词。这组字符相当有限:它只包括大写和小写的罗马字母,十进制数字和下划线字符。不幸的是,重要的字符,例如“é”或“ü”,被视为断词。</p>
</div>
</td>
</tr>
@@ -543,7 +543,7 @@ console.log("The value of lastIndex is " + /d(b+)d/g.lastIndex);
<p>当发生/d(b+)d/g使用两个不同状态的正则表达式对象,lastIndex属性会得到不同的值。如果你需要访问一个正则表达式的属性,则需要创建一个对象初始化生成器,你应该首先把它赋值给一个变量。</p>
-<h3 id="使用括号的子字符串匹配_2"><a>使用括号的子字符串匹配</a></h3>
+<h3 id="使用括号的子字符串匹配_2">使用括号的子字符串匹配</h3>
<p>一个正则表达式模式使用括号,将导致相应的子匹配被记住。例如,/a(b)c /可以匹配字符串“abc”,并且记得“b”。回调这些括号中匹配的子串,使用数组元素[1],……[n]。</p>
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
<div>{{EmbedInteractiveExample("pages/js/regexp-unicode-property-escapes.html", "taller")}}</div>
-<div class="blockIndicator note">
-<p><strong>Note: </strong>使用 Unicode 属性转义依靠 <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicode"><code>\u</code> 标识</a>,<code>\u</code> 表示该字符串被视为一串 Unicode 代码点。参考 <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicode">RegExp.prototype.nicode</a></code>.</p>
+<div class="note">
+<p><strong>备注:</strong>使用 Unicode 属性转义依靠 <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicode"><code>\u</code> 标识</a>,<code>\u</code> 表示该字符串被视为一串 Unicode 代码点。参考 <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicode">RegExp.prototype.nicode</a></code>.</p>
</div>
-<div class="blockIndicator note">
-<p><strong>Note:</strong> 某些 Unicode 属性比<a href="/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Character_Classes">字符类</a>(如 <code>\w</code> 只匹配拉丁字母 <code>a</code> 到 <code>z</code>)包含更多的字符  ,但后者浏览器兼容性更好 (截至2020 一月).</p>
+<div class="note">
+<p><strong>备注:</strong> 某些 Unicode 属性比<a href="/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Character_Classes">字符类</a>(如 <code>\w</code> 只匹配拉丁字母 <code>a</code> 到 <code>z</code>)包含更多的字符  ,但后者浏览器兼容性更好 (截至2020 一月).</p>
</div>
<h2 id="句法">句法</h2>
@@ -48,8 +48,8 @@ translation_of: Web/JavaScript/Guide/Regular_Expressions/Unicode_Property_Escape
<dd>很多值有同名或简写(e.g. 对应着 <code>General_Category</code> 属性名的属性值 <code>Decimal_Number</code> 可以写作 <code>Nd</code>, <code>digit</code>, 或 <code>Decimal_Number</code>). 大多数属性值的 <em><code>Unicode属性名</code></em> 和等号可以省去。如果想明确某 <em><code>Unicode属性名</code></em>,必须给出它的值。</dd>
</dl>
-<div class="blockIndicator note">
-<p><strong>Note:</strong> 因为可使用的属性和值太多,这里不一一赘述,仅提供几个例子。</p>
+<div class="note">
+<p><strong>备注:</strong> 因为可使用的属性和值太多,这里不一一赘述,仅提供几个例子。</p>
</div>
<h2 id="基本原理">基本原理</h2>