-
Notifications
You must be signed in to change notification settings - Fork 247
Closed
Labels
Description
The TC39 proposal for RegExp lookbehind specifies that variable-length lookbehinds are supposed to be supported. V8 implements this, and it's tested in these test262 tests, but it doesn't seem to be supported in the RegExp implementation in Moddable here.
A test case:
/(?<=a*)/This produces the following error message:
/home/littledan/moddable/examples/helloworld/main.js:15: error: invalid regular expression: lookbehind assertion is not fixed length!
Did you consider supporting variable-length lookbehind? Maybe it doesn't work out on an embedded profile.
If Moddable implements lookbehind per spec, this will be helpful for the TC39 proposal reaching Stage 4, as well as limiting compatibility issues with non-Moddable JS.
mathiasbynens