Skip to content

Commit 499de93

Browse files
AndyZhuangziishaned
authored andcommitted
Something really need to be clarified (ziishaned#48)
* Something really need to be clarified the `+` is tricky * add explanation on the optional ? Thanks for the great project , hope this can help to clarify a bit in Chinese * Change a bit on . some typo corrected
1 parent 3cb7983 commit 499de93

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README-cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@
261261

262262
反斜线 `\` 在表达式中用于转码紧跟其后的字符. 用于指定 `{ } [ ] / \ + * . $ ^ | ?` 这些特殊字符. 如果想要匹配这些特殊字符则要在其前面加上反斜线 `\`.
263263

264-
例如 `.` 是用来匹配除换行符外的所有字符的. 如果想要匹配句子中的 `.` 则要写成 `\.`.
264+
例如 `.` 是用来匹配除换行符外的所有字符的. 如果想要匹配句子中的 `.` 则要写成 `\.` 以下这个例子 `\.?`是选择性匹配`.`
265265

266266
<pre>
267267
"(f|c|m)at\.?" => The <a href="#learn-regex"><strong>fat</strong></a> <a href="#learn-regex"><strong>cat</strong></a> sat on the <a href="#learn-regex"><strong>mat.</strong></a>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ zero or more spaces.
176176
### 2.3.2 The Plus
177177

178178
The symbol `+` matches one or more repetitions of the preceding character. For example, the regular expression `c.+t` means: lowercase
179-
letter `c`, followed by at least one character, followed by the lowercase character `t`.
179+
letter `c`, followed by at least one character, followed by the lowercase character `t`. It needs to be clarified that `t` is the last `t` in the sentence.
180180

181181
<pre>
182182
"c.+t" => The fat <a href="#learn-regex"><strong>cat sat on the mat</strong></a>.

0 commit comments

Comments
 (0)