Bug 275672 - Implement RegExp modifiers (stage3 proposal)
Summary: Implement RegExp modifiers (stage3 proposal)
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: https://github.com/tc39/proposal-rege...
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2024-06-19 14:36 PDT by Jarred Sumner
Modified: 2024-06-26 14:37 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jarred Sumner 2024-06-19 14:36:59 PDT
The TC39 Regular Expression Pattern Modifiers for ECMAScript proposal has reached stage3 - https://github.com/tc39/proposal-regexp-modifiers

It shipped in V8 in Chrome 125/Edge 125

It adds syntax like the below:

```
/(?i:test)/.test('Test');
```


Currently, this throws an error like:
```
SyntaxError: Invalid regular expression: unrecognized character after (?
```

Related issue: https://github.com/oven-sh/bun/issues/11960
Comment 1 Radar WebKit Bug Importer 2024-06-26 14:37:14 PDT
<rdar://problem/130622886>