Lookbehind in JS regular expressions

- OTHER

The positive lookbehind ((?<= )) and negative lookbehind ((?<! )) zero-width assertions in JavaScript regular expressions can be used to ensure a pattern is preceded by another pattern.

Chrome

  1. 4 - 61: Not supported
  2. 62 - 125: Supported
  3. 126: Supported
  4. 127 - 129: Supported

Edge

  1. 12 - 18: Not supported
  2. 79 - 125: Supported
  3. 126: Supported

Safari

  1. 3.1 - 16.3: Not supported
  2. 16.4 - 17.4: Supported
  3. 17.5: Supported
  4. 17.6 - TP: Supported

Firefox

  1. 2 - 77: Not supported
  2. 78 - 127: Supported
  3. 128: Supported
  4. 129 - 131: Supported

Opera

  1. 9 - 48: Not supported
  2. 49 - 110: Supported
  3. 111: Supported

IE

  1. 5.5 - 10: Not supported
  2. 11: Not supported

Chrome for Android

  1. 126: Supported

Safari on iOS

  1. 3.2 - 16.3: Not supported
  2. 16.4 - 17.4: Supported
  3. 17.5: Supported
  4. 17.6 - 18.0: Supported

Samsung Internet

  1. 4 - 7.4: Not supported
  2. 8.2 - 24: Supported
  3. 25: Supported

Opera Mini

  1. all: Not supported

Opera Mobile

  1. 10 - 12.1: Not supported
  2. 80: Supported

UC Browser for Android

  1. 15.5: Supported

Android Browser

  1. 2.1 - 4.4.4: Not supported
  2. 126: Supported

Firefox for Android

  1. 127: Supported

QQ Browser

  1. 14.9: Supported

Baidu Browser

  1. 13.52: Supported

KaiOS Browser

  1. 2.5: Not supported
  2. 3: Supported
Resources:
Blog post on lookbehind assertions
Safari implementation bug
Firefox implementation bug
MDN: Regular Expressions Assertions