We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 00faad0 commit 05ae386Copy full SHA for 05ae386
9-regular-expressions/07-regexp-escaping/article.md
@@ -71,7 +71,7 @@ alert( "Chapter 5.1".match(reg) ); // null
71
alert("\d\.\d"); // d.d
72
```
73
74
-在字符串中的反斜杠表示转义或者类似 `\n` 这种只能在字符串中使用的特殊字符。这个引用会“消费”并且解释这些字符,比如说:
+在字符串中的反斜杠表示转义或者类似 `\n` 这种只能在字符串中使用的特殊字符。这个引用会“消耗”并且解释这些字符,比如说:
75
76
- `\n` —— 变成一个换行字符,
77
- `\u1234` —— 变成该编码所对应的 Unicode 字符,
@@ -96,4 +96,4 @@ alert( "Chapter 5.1".match(regexp) ); // 5.1
96
97
- 要在字面意义上搜索特殊字符 `pattern:[ \ ^ $ . | ? * + ( )`,我们需要在它们前面加上一个反斜杠 `\`(“转义它们”)。
98
- 如果在 `pattern:/.../` 内(但不在 `new RegExp` 内),我们还需要转义 `/`。
99
-- 当将字符串传递给给 `new RegExp` 时,我们需要双反斜杠 `\\`,因为字符串引号会消费一个反斜杠。
+- 当将字符串传递给给 `new RegExp` 时,我们需要双反斜杠 `\\`,因为字符串引号会消耗一个反斜杠。
0 commit comments