aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/global_objects/string/replace
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/javascript/reference/global_objects/string/replace')
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/string/replace/index.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/string/replace/index.html b/files/zh-cn/web/javascript/reference/global_objects/string/replace/index.html
index 5991e8fa0a..e5930019f1 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/string/replace/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/string/replace/index.html
@@ -82,13 +82,13 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/replace
<td>插入当前匹配的子串右边的内容。</td>
</tr>
<tr>
- <td style="white-space: nowrap;"><code>$<em>n</em></code></td>
+ <td><code>$<em>n</em></code></td>
<td>
<p>假如第一个参数是 {{jsxref("RegExp")}}对象,并且 n 是个小于100的非负整数,那么插入第 n 个括号匹配的字符串。提示:索引是从1开始。如果不存在第 n个分组,那么将会把匹配到到内容替换为字面量。比如不存在第3个分组,就会用“$3”替换匹配到的内容。</p>
</td>
</tr>
<tr>
- <td style="white-space: nowrap;"><code><em>$&lt;Name&gt;</em></code></td>
+ <td><code><em>$&lt;Name&gt;</em></code></td>
<td> 这里<em><code>Name</code></em> 是一个分组名称。如果在正则表达式中并不存在分组(或者没有匹配),这个变量将被处理为空字符串。只有在支持命名分组捕获的浏览器中才能使用。</td>
</tr>
</tbody>