Skip to content

Commit 3add71c

Browse files
committed
fix: typo
1 parent 8448ea5 commit 3add71c

File tree

1 file changed

+1
-1
lines changed
  • 9-regular-expressions/07-regexp-escaping

1 file changed

+1
-1
lines changed

9-regular-expressions/07-regexp-escaping/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ alert("\d\.\d"); // d.d
7575

7676
- `\n` —— 变成一个换行字符,
7777
- `\u1234` —— 变成该编码所对应的 Unicode 字符,
78-
- ……而当没有特殊含义时:如 `pattern:\d` 或者 `pattern:\z`碰到这种情况时则会把自动移除反斜杠
78+
- ……而当没有特殊含义时:如 `pattern:\d` 或者 `pattern:\z`碰到这种情况时则会自动移除反斜杠
7979

8080
所以调用 `new RegExp` 会获得一个没有反斜杠的字符串。这就是搜索不起作用的原因!
8181

0 commit comments

Comments
 (0)