Skip to content

Commit 1f32be6

Browse files
committed
2019.03.14
1 parent 40e8d7d commit 1f32be6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Cute-JavaScript/Cute-Regular/1.字符匹配.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ s.match(r); // ["a1b"]
7272

7373
但是在 **贪婪匹配**`/\d{2,4}/g` ,会**尽可能多**匹配,如超过 4 个,就只匹配 4 个,如有 3 个,就匹配 3 位。
7474

75-
而再 **惰性匹配**`/\d{2,4}?/g` ,会 **尽可能少** 匹配,如超过 2 个,就只匹配 2 个,不会继续匹配下去。
75+
而在 **惰性匹配**`/\d{2,4}?/g` ,会 **尽可能少** 匹配,如超过 2 个,就只匹配 2 个,不会继续匹配下去。
7676

7777
```js
7878
let r1 = /\d{2,4}/g;
@@ -83,7 +83,7 @@ s.match(r2); // ["12", "12", "34", "12", "34"]
8383
```
8484

8585
|惰性量词|贪婪量词|
86-
|:---:|---|
86+
|:---:|:---:|
8787
| `{m,m}?` |`{m,m}`|
8888
| `{m,}?` |`{m,}`|
8989
| `??` |`?`|

0 commit comments

Comments
 (0)