The output when using character class \ s except for look-behind is ' HTML5'.
This commit is contained in:
segayuu 2019-06-03 12:26:30 +09:00 committed by GitHub
parent b88b4dc711
commit 7067d6275f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -61,7 +61,7 @@ alert( str.match(reg) ); // CSS4
Also we can use many character classes:
```js run
alert( "I love HTML5!".match(/\s\w\w\w\w\d/) ); // 'HTML5'
alert( "I love HTML5!".match(/\s\w\w\w\w\d/) ); // ' HTML5'
```
The match (each character class corresponds to one result character):