regexp-character-classes: wording

This commit is contained in:
Alexey Pyltsyn 2019-04-27 13:22:30 +03:00 committed by GitHub
parent 19223ae762
commit e41783a78e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -123,7 +123,7 @@ Another example: a regexp `pattern:\b\d\d\b` looks for standalone two-digit numb
alert( "1 23 456 78".match(/\b\d\d\b/g) ); // 23,78 alert( "1 23 456 78".match(/\b\d\d\b/g) ); // 23,78
``` ```
```warn header="Word boundary doesn't work for non-English alphabets" ```warn header="Word boundary doesn't work for non-Latin alphabets"
The word boundary check `\b` tests for a boundary between `\w` and something else. But `\w` means an English letter (or a digit or an underscore), so the test won't work for other characters (like cyrillic or hieroglyphs). The word boundary check `\b` tests for a boundary between `\w` and something else. But `\w` means an English letter (or a digit or an underscore), so the test won't work for other characters (like cyrillic or hieroglyphs).
``` ```