Description
JS regexes now support a u
flag which changes their semantics regarding unicode characters in some ways and enables some new features.
Examples:
/𝌆{2}/u.test('𝌆𝌆') => true
/𝌆{2}/.test('𝌆𝌆') => false
/\p{Sm}/u.test('+') => true
/\p{Sm}/.test('+') => false
Example in vscode:
- Have
𝌆𝌆
in editor - Search
𝌆{2}
- No match
- Searching
𝌆𝌆
does match
Not sure how many users are affected by this but it's worth investigating.
Also, this support seems half-baked in Node 8 but works more in Node 10, so maybe we wait for an electron update.