RegExp lookbehind assertions

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.

Documentation

Specification

Working draft or equivalent

Status in Chromium

Blink>JavaScript>Language


Enabled by default (tracking bug) in:

  • Chrome for desktop release 62
  • Chrome for Android release 62
  • Android WebView release 62
  • Opera release 49
  • Opera for Android release 49

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

Owners

Last updated on 2017-08-10