Fix typo in 9.8 task solution (Sets and ranges [...])
This commit is contained in:
parent
633db6fbe9
commit
4a3d842bc6
1 changed files with 1 additions and 1 deletions
|
@ -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"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue