Fix typo in 9.8 task solution (Sets and ranges [...])

This commit is contained in:
Vse Mozhe Buty 2020-12-08 17:38:02 +02:00 committed by GitHub
parent 633db6fbe9
commit 4a3d842bc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,7 +5,7 @@ Answers: **no, yes**.
```js run ```js run
alert( "Java".match(/Java[^script]/) ); // null 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 ```js run
alert( "JavaScript".match(/Java[^script]/) ); // "JavaS" alert( "JavaScript".match(/Java[^script]/) ); // "JavaS"