Intent to ship: RegExp lookbehind assertions

120 views
Skip to first unread message

Mathias Bynens

unread,
Jul 30, 2017, 10:18:25 AM7/30/17
to blink-dev, v8-u...@googlegroups.com, Yang Guo, Daniel Ehrenberg, Erik Corry

Contact emails

yan...@chromium.org, litt...@chromium.org, erik...@chromium.org, mat...@chromium.org


Spec

https://github.com/tc39/proposal-regexp-lookbehind (stage 3 proposal)


Summary

Lookarounds are zero-width assertions that match a string without consuming anything. ECMAScript has lookahead assertions that does this in forward direction, but the language is missing a way to do this backward which the lookbehind assertions provide. With lookbehind assertions, one can make sure that a pattern is or isn’t preceded by another, e.g. matching a dollar amount without capturing the dollar sign.


Link to “Intent to Implement” blink-dev discussion

There was none. Note that since this is a V8/JS feature, this post is just an FYI to blink-dev — no signoff from Blink API owners is required.


Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes.


Demo link

Examples can be found here:


Interoperability and Compatibility Risk

Low; this feature gives behavior to something which was previously a syntax error.


Edge/Chakra: public support; tracking issue: https://github.com/Microsoft/ChakraCore/issues/3448

Firefox/SpiderMonkey: no signals; tracking issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1225665

Safari/JavaScriptCore: no signals; tracking issue: https://bugs.webkit.org/show_bug.cgi?id=174931

Web developers: positive signals


Is this feature fully tested?

Yes. In addition to V8’s own tests, Test262 includes tests for this feature.


OWP launch tracking bug

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


Entry on the feature dashboard

https://www.chromestatus.com/feature/5668726032564224

Adam Klein

unread,
Jul 31, 2017, 5:42:31 PM7/31/17
to Mathias Bynens, blink-dev, v8-users, Yang Guo, Daniel Ehrenberg, Erik Corry
LGTM!

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAJYpFjCaYnJx-NCHzbHYRKceAPkdN1UaU0WwSanE8PKjNuCFKg%40mail.gmail.com.

Mathias Bynens

unread,
Aug 11, 2017, 2:03:10 PM8/11/17
to v8-u...@googlegroups.com, Mathias Bynens, blink-dev, Yang Guo, Daniel Ehrenberg, Erik Corry
For future reference: this landed in V8 v6.2.103 and should thus be available in Chrome 62.

--
--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups "v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages