-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assertions within alternations are not supported #40
Comments
Thanks for raising this. The problem is that the library currently doesn't support start or end of string assertions within alternations. see the spec test here: https://github.com/ColinEberhardt/assemblyscript-regex/blob/main/assembly/__spec_tests__/generated.spec.ts#L2205 The current implementation assumes that these occur at the start or end of the regex string: https://github.com/ColinEberhardt/assemblyscript-regex/blob/main/assembly/regexp.ts#L126-L132
That would be great! The assertion logic is applied in this function: https://github.com/ColinEberhardt/assemblyscript-regex/blob/main/assembly/regexp.ts#L153-L222 As an aside, it would probably be useful for this library to throw an error if you use a regex that has features that are not supported yet. |
Awesome, thanks a lot for this feedbacks! I'll try to give it a shot ASAP, not sure exactly when though (hopefully in the next few months). |
Hello!
Here is the test to reproduce the issue:
While in Javascript:
Or on one line:
Happy to give it a shot, if you have any hint where to start looking it would probably save me a lot of time :-)
Thanks!
The text was updated successfully, but these errors were encountered: