Skip to content

Update regexp.md,增加脱字符示例 #132

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 1 commit into from
Jul 12, 2019
Merged

Conversation

njueyupeng
Copy link
Contributor

增加脱字符的示例,防止歧义。 原有示例:

/[^abc]/.test('hello world') // true

上面代码中,字符串hello world不包含字母abc中的任一个,所以返回true
可能引起误解:不能包含a,b,c才能返回true

增加脱字符的示例,防止歧义。 原有示例:
>>>
```javascript
/[^abc]/.test('hello world') // true
```
>>> 上面代码中,字符串`hello world`不包含字母`a`、`b`、`c`中的任一个,所以返回`true`;
可能引起误解:不能包含a,b,c才能返回true
@ruanyf
Copy link
Contributor

ruanyf commented Jul 12, 2019

这里确实写得有问题,我再改一下。

@ruanyf ruanyf merged commit 7a63507 into wangdoc:master Jul 12, 2019
ruanyf added a commit that referenced this pull request Jul 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants