Commit 5193f40
authored
Update regexp.md
增加脱字符的示例,防止歧义。 原有示例:
>>>
```javascript
/[^abc]/.test('hello world') // true
```
>>> 上面代码中,字符串`hello world`不包含字母`a`、`b`、`c`中的任一个,所以返回`true`;
可能引起误解:不能包含a,b,c才能返回true1 parent bf0fbfd commit 5193f40
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
547 | 547 | | |
548 | 548 | | |
549 | 549 | | |
| 550 | + | |
550 | 551 | | |
551 | 552 | | |
552 | 553 | | |
553 | | - | |
| 554 | + | |
554 | 555 | | |
555 | 556 | | |
556 | 557 | | |
| |||
0 commit comments