Merge pull request #2370 from vsemozhetbyt/patch-4

Fix typo in 9.8 task solution (Sets and ranges [...])
This commit is contained in:
Ilya Kantor 2020-12-13 20:28:35 +03:00 committed by GitHub
commit 76f07329c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,7 +5,7 @@ Answers: **no, yes**.
```js run
alert( "Java".match(/Java[^script]/) ); // null
```
- Yes, because the part `pattern:[^script]` part matches the character `"S"`. It's not one of `pattern:script`. As the regexp is case-sensitive (no `pattern:i` flag), it treats `"S"` as a different character from `"s"`.
- Yes, because the `pattern:[^script]` part matches the character `"S"`. It's not one of `pattern:script`. As the regexp is case-sensitive (no `pattern:i` flag), it treats `"S"` as a different character from `"s"`.
```js run
alert( "JavaScript".match(/Java[^script]/) ); // "JavaS"