Skip to content

Commit 773785b

Browse files
Boziishaned
authored andcommitted
Correct some word error (ziishaned#53)
1 parent 591de7b commit 773785b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

README-cn.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
|*|匹配>=0个重复的在*号之前的字符.|
101101
|+|匹配>=1个重复的+号前的字符.
102102
|?|标记?之前的字符为可选.|
103-
|{n,m}|匹配num个中括号之前的字符 (n <= num <= m).|
103+
|{n,m}|匹配num个大括号之前的字符 (n <= num <= m).|
104104
|(xyz)|字符集, 匹配与 xyz 完全相等的字符串.|
105105
|&#124;|或运算符,匹配符号前或后的字符.|
106106
|&#92;|转义字符,用于匹配一些保留的字符 <code>[ ] ( ) { } . * + ? ^ $ \ &#124;</code>|
@@ -180,7 +180,7 @@
180180

181181
### 2.3.2 `+`
182182

183-
`+`号匹配`+`号之前的字符出现 >=1 次个字符.
183+
`+`号匹配`+`号之前的字符出现 >=1 .
184184
例如表达式`c.+t` 匹配以首字母`c`开头以`t`结尾,中间跟着任意个字符的字符串.
185185

186186
<pre>
@@ -209,8 +209,7 @@
209209
## 2.4 `{}`
210210

211211
在正则表达式中 `{}` 是一个量词, 常用来一个或一组字符可以重复出现的次数.
212-
例如, 表达式 `[0-9]{2,3}` 匹配 2~3 位 0~9 的数字.
213-
212+
例如, 表达式 `[0-9]{2,3}` 匹配最少 2 位最多 3 位 0~9 的数字.
214213

215214
<pre>
216215
"[0-9]{2,3}" => The number was 9.<a href="#learn-regex"><strong>999</strong></a>7 but we rounded it off to <a href="#learn-regex"><strong>10</strong></a>.0.
@@ -356,7 +355,7 @@
356355
`?=...` 前置约束(存在), 表示第一部分表达式必须跟在 `?=...`定义的表达式之后.
357356

358357
返回结果只满足第一部分表达式.
359-
定义一个前置约束(存在)要使用 `()`. 在括号内部使用一个问号和等号: `(?=...)`.
358+
定义一个前置约束(存在)要使用 `()`. 在括号内部使用一个问号和等号: `(?=...)`.
360359

361360
前置约束的内容写在括号中的等号后面.
362361
例如, 表达式 `(T|t)he(?=\sfat)` 匹配 `The``the`, 在括号中我们又定义了前置约束(存在) `(?=\sfat)` ,即 `The``the` 后面紧跟着 `(空格)fat`.

0 commit comments

Comments
 (0)