Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 9-regular-expressions/07-regexp-escaping/article.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ let regexp = new RegExp(regStr);
alert( "Chapter 5.1".match(regexp) ); // 5.1
```

## Summary
## 总结

- 要在字面意义上搜索特殊字符 `pattern:[ \ ^ $ . | ? * + ( )`,我们需要在它们前面加上一个反斜杠 `\`(“转义它们”)。
- 如果在 `pattern:/.../` 内(但不在 `new RegExp` 内),我们还需要转义 `/`。
Expand Down