RegExp pattern modifiers
- Category
- JavaScript
- Type
- Chromium catches up
- Status
- No active development (Chrome No active development)
- Intent stage
- Start prototyping
Summary
This proposal adds the ability to locally toggle, in RegExps, the 's', 'm', 'i', and the future 'x' flags locally to a subexpression via the syntax `(?imsx-imsx:subexpr)`.
Standards & signals
- Specification: https://tc39.es/proposal-regexp-modifiers
- Firefox: Positive — This is a Stage 3 TC39 proposal.
- Safari: Positive — This is a Stage 3 TC39 proposal.
- Web developers: No signals
- Tracking bug: https://bugs.chromium.org/p/v8/issues/detail?id=12956
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=regexp-pattern-modifiers
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+RegExp%20pattern%20modifiers
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=RegExp%20pattern%20modifiers
- Baseline status: https://webstatus.dev/?q=RegExp%20pattern%20modifiers
Explainers: https://github.com/tc39/proposal-regexp-modifiers/blob/main/README.md