Skip to content

Variable-length RegExp lookbehind does not work #13

Description

@littledan

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions