← Back to release summary
RegExp v flag with set notation + properties of strings
- Category
- JavaScript
- Type
- Chromium catches up
- Status
- Enabled by default (Chrome 112)
- Intent stage
- Prepare to ship
Summary
Add set operations, string literals, nested classes and unicode properties of strings to regular expression character classes.
Set operations and unicode properties of strings allow developers to create regular expressions matching strings with certain unicode characters with ease. E.g. /[\p{Script_Extensions=Greek}&&\p{Letter}]/v matches all greek letters.
Standards & signals
- Specification: https://github.com/tc39/proposal-regexp-v-flag
- Firefox: Positive — Assumed positive because this proposal is Stage 3 in TC39.
- Safari: Positive — Positive. This proposal is Stage 3 in TC39; a WebKit engineer approved the spec changes as a designated Stage 3 reviewer; and the JavaScriptCore implementation has landed: https://commits.webkit.org/261188@main
- Web developers: No signals
Samples: https://v8.dev/features/regexp-v-flag
View on chromestatus.com