Skip to content

Correct some word error #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 5, 2017
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
9 changes: 4 additions & 5 deletions README-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
|*|匹配>=0个重复的在*号之前的字符.|
|+|匹配>=1个重复的+号前的字符.
|?|标记?之前的字符为可选.|
|{n,m}|匹配num个中括号之前的字符 (n <= num <= m).|
|{n,m}|匹配num个大括号之前的字符 (n <= num <= m).|
|(xyz)|字符集, 匹配与 xyz 完全相等的字符串.|
|&#124;|或运算符,匹配符号前或后的字符.|
|&#92;|转义字符,用于匹配一些保留的字符 <code>[ ] ( ) { } . * + ? ^ $ \ &#124;</code>|
Expand Down Expand Up @@ -180,7 +180,7 @@

### 2.3.2 `+` 号

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

<pre>
Expand Down Expand Up @@ -209,8 +209,7 @@
## 2.4 `{}` 号

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

例如, 表达式 `[0-9]{2,3}` 匹配最少 2 位最多 3 位 0~9 的数字.

<pre>
"[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.
Expand Down Expand Up @@ -356,7 +355,7 @@
`?=...` 前置约束(存在), 表示第一部分表达式必须跟在 `?=...`定义的表达式之后.

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

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