LGTM1 - looks like a useful addition already supported in a number of other RegExp engines.

On 3/27/24 11:38 AM, 'Shu-yu Guo' via blink-dev wrote:


        Contact emails

s...@chromium.org, pth...@chromium.org


        Explainer

None


        Specification

https://tc39.es/proposal-regexp-modifiers


        Summary

RegExp modifiers adds the ability to locally modify the 'i', 'm', and 's' flags inside a pattern. To enable a flag for a subexpression, use `(?X:subexpr)` where X is one of 'i', 'm', or 's'. To disable a flag for a subexpression, use `(-X:subexpr)`. For example, for the case-insensitivity 'i' flag: ``` const re1 = /^[a-z](?-i:[a-z])$/i; re1.test("ab"); // true re1.test("Ab"); // true re1.test("aB"); // false const re2 = /^(?i:[a-z])[a-z]$/; re2.test("ab"); // true re2.test("Ab"); // true re2.test("aB"); // false ```



        Blink component

Blink>JavaScript>Regexp <https://bugs.chromium.org/p/chromium/issues/list?q=component:Blink%3EJavaScript%3ERegexp>


        TAG review

None


        TAG review status

Not applicable


        Risks



        Interoperability and Compatibility

No interoperability risk. This is a Stage 3 TC39 proposal.



/Gecko/: Positive TC39 Stage 3

/WebKit/: Positive TC39 Stage 3

/Web developers/: No signals

/Other signals/:


        WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None



        Debuggability

No special needs. JS RegExps already debuggable.



        Will this feature be supported on all six Blink platforms
        (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?

Yes


        Is this feature fully tested by web-platform-tests
        
<https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md>?

Yes

In test262: https://github.com/tc39/test262/pull/3960



        Flag name on chrome://flags

--js-regexp-modifiers


        Finch feature name

JavaScriptRegExpModifiers


        Requires code in //chrome?

False


        Estimated milestones

DevTrial on desktop     122

DevTrial on Android     122



        Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

None


        Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5100254548721664

This intent message was generated by Chrome Platform Status <https://chromestatus.com/>.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscr...@chromium.org. To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAN-e9e948%3DQSg6zskRN25JGkvxXVP67RDkXHvijzBRueP1DnzA%40mail.gmail.com <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAN-e9e948%3DQSg6zskRN25JGkvxXVP67RDkXHvijzBRueP1DnzA%40mail.gmail.com?utm_medium=email&utm_source=footer>.

--
You received this message because you are subscribed to the Google Groups 
"blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to blink-dev+unsubscr...@chromium.org.
To view this discussion on the web visit 
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/719d4913-1462-479c-b2e4-7ad6cd36c539%40chromium.org.

Reply via email to