Skip to content

Commit 79b6d5b

Browse files
author
TinyWang
authored
book: fix the incorrect character in regex (changkun#107)
1 parent 3abc907 commit 79b6d5b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

book/en-us/06-regex.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ and is also the core matching syntax of a regular expression. See the table belo
4848
| `\`| Marks the next character as either a special character, or a literal character, or a backward reference, or an octal escape character. For example, `n` Matches the character `n`. `\n` matches newline characters. The sequence `\\` Matches the `'\'` character, while `\(` matches the `'('` character.|
4949
|`^`| Matches the beginning of the input string, unless it is used in a square bracket expression, at which point it indicates that the set of characters is not accepted. |
5050
|`{`| Marks the beginning of a qualifier expression. |
51-
|`\`| Indicates a choice between the two. |
51+
|`\|`| Indicates a choice between the two. |
5252

5353
### Quantifiers
5454

book/zh-cn/06-regex.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ order: 6
4242
| `\`| 将下一个字符标记为或特殊字符、或原义字符、或向后引用、或八进制转义符。例如, `n` 匹配字符 `n``\n` 匹配换行符。序列 `\\` 匹配 `'\'` 字符,而 `\(` 则匹配 `'('` 字符。|
4343
|`^`| 匹配输入字符串的开始位置,除非在方括号表达式中使用,此时它表示不接受该字符集合。|
4444
|`{`| 标记限定符表达式的开始。|
45-
|`\`| 指明两项之间的一个选择。|
45+
|`\|`| 指明两项之间的一个选择。|
4646

4747
### 限定符
4848

0 commit comments

Comments
 (0)