Skip to content

Consider searching with JS regexes in unicode mode #61746

Closed
microsoft/azuredatastudio
#7206
@roblourens

Description

@roblourens

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.

More info: https://mathiasbynens.be/notes/es6-unicode-regex

Metadata

Metadata

Labels

editor-findEditor find operationsfeature-requestRequest for new features or functionalitysearchSearch widget and operation issuesverification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions