Intent to Ship: RegExp match indices

62 views
Skip to first unread message

Shu-yu Guo

unread,
Jan 27, 2021, 6:56:52 PMJan 27
to blink-dev

Contact emails

s...@chromium.org

Explainer


https://v8.dev/features/regexp-match-indices
https://github.com/tc39/proposal-regexp-match-indices

Specification

https://tc39.es/proposal-regexp-match-indices/

Summary

This proposal adds a new `.indices` property to the result array object returned by RegExp.prototype.exec and String.prototype.match. This property is an indices array containing a pair of start and end indices for each captured substring. As producing this array is expensive, the `.indices` property is only present when the /d flag is passed.



Blink component

Blink

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility



Gecko: In development (https://github.com/mozilla/standards-positions/issues/478#issuecomment-768159307https://bugzilla.mozilla.org/show_bug.cgi?id=1519483

Edge: No signal

WebKit: In development (https://bugs.webkit.org/show_bug.cgi?id=202475) Michael Saboff from JSC says they are landing soon: https://github.com/tc39/proposal-regexp-match-indices/issues/23#issuecomment-761221843

Web developers: Positive (https://twitter.com/mathias/status/1206976670755905536) Mathias's tweet of the V8 blog explainer received many likes with some explicit supports from non-browser implementer developers in replies (though far fewer than the likes). There's also https://twitter.com/ljharb/status/1154100770985242624. While it's not direct evidence of sentiment one way or another, the amount of engagement shows and replies show that folks care about the feature.


Is this feature fully tested by web-platform-tests?

In test262

Tracking bug

https://bugs.chromium.org/p/v8/issues/detail?id=9548

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/6558676666023936

Mike West

unread,
Jan 28, 2021, 2:54:21 PMJan 28
to blink-dev, Shu-yu Guo
LGTM1. This is a stage 3 proposal with active development from both WebKit and Gecko; shipping it along with them sounds quite reasonable to me.

-mike

Manuel Rego Casasnovas

unread,
Jan 28, 2021, 2:58:47 PMJan 28
to Mike West, blink-dev, Shu-yu Guo
LGTM2

On 28/01/2021 20:54, Mike West wrote:
> LGTM1. This is a stage 3 proposal with active development from both
> WebKit and Gecko; shipping it along with them sounds quite reasonable to me.
>
> -mike
>
> On Thursday, January 28, 2021 at 12:56:52 AM UTC+1 Shu-yu Guo wrote:
>
>
> Contact emails
>
> s...@chromium.org
>
>
> Explainer
>
>
> https://v8.dev/features/regexp-match-indices
> <https://v8.dev/features/regexp-match-indices>
> https://github.com/tc39/proposal-regexp-match-indices
> <https://github.com/tc39/proposal-regexp-match-indices>
>
>
> Specification
>
> https://tc39.es/proposal-regexp-match-indices/
> <https://tc39.es/proposal-regexp-match-indices/>
>
>
> Summary
>
> This proposal adds a new `.indices` property to the result array
> object returned by RegExp.prototype.exec and String.prototype.match.
> This property is an indices array containing a pair of start and end
> indices for each captured substring. As producing this array is
> expensive, the `.indices` property is only present when the /d flag
> is passed.
>
>
>
> Blink component
>
> Blink
> <https://bugs.chromium.org/p/chromium/issues/list?q=component:Blink>
>
>
> TAG review
>
> None
>
>
> TAG review status
>
> Not applicable
>
>
> Risks
>
>
>
> Interoperability and Compatibility
>
>
>
> Gecko: In development
> (https://github.com/mozilla/standards-positions/issues/478#issuecomment-768159307
> <https://github.com/mozilla/standards-positions/issues/478#issuecomment-768159307>)
> https://bugzilla.mozilla.org/show_bug.cgi?id=1519483
> <https://bugs.webkit.org/show_bug.cgi?id=202475>) Michael Saboff
> <https://twitter.com/mathias/status/1206976670755905536>) Mathias's
> tweet of the V8 blog explainer received many likes with some
> explicit supports from non-browser implementer developers in replies
> (though far fewer than the likes). There's also
> https://twitter.com/ljharb/status/1154100770985242624
> <https://twitter.com/ljharb/status/1154100770985242624>. While it's
> not direct evidence of sentiment one way or another, the amount of
> engagement shows and replies show that folks care about the feature.
>
>
> Is this feature fully tested by web-platform-tests
> <https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md>?
>
> In test262 <https://github.com/tc39/test262/pull/2309>
>
>
> Tracking bug
>
> https://bugs.chromium.org/p/v8/issues/detail?id=9548
> <https://chromestatus.com/feature/6558676666023936>
>
> --
> 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+...@chromium.org
> <mailto:blink-dev+...@chromium.org>.
> To view this discussion on the web visit
> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/2fdeaf44-90c5-42af-a27a-c6b21ee16ab1n%40chromium.org
> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/2fdeaf44-90c5-42af-a27a-c6b21ee16ab1n%40chromium.org?utm_medium=email&utm_source=footer>.

Yoav Weiss

unread,
Jan 28, 2021, 2:59:09 PMJan 28
to Mike West, blink-dev, Shu-yu Guo
LGTM2

--
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+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/2fdeaf44-90c5-42af-a27a-c6b21ee16ab1n%40chromium.org.

Yoav Weiss

unread,
Jan 28, 2021, 2:59:26 PMJan 28
to Mike West, blink-dev, Shu-yu Guo
s/2/3/
Reply all
Reply to author
Forward
0 new messages