-
Notifications
You must be signed in to change notification settings - Fork 661
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
Regex causes "Quantifier has nothing to repeat" #46
Comments
I've discovered the issue, I needed to add some "seemingly useless" escapes. Just a challenge with different regex parsers:
turned to:
Fixes the issue. Just something to note for any other developer out there that has some regex and it's only failing on Hermes. |
For me, i encountered an error when use named capturing group in regex
|
Hermes does not yet support named capture groups in RegExp. We're adding newer JS features incrementally and named capture groups will be implemented in the future. Unfortunately, priority for this particular feature is low because we have other features to implement first, but we're open to working with the community on pull requests to add it. You can see more information about RegExp support here: |
Summary: Added a *much shorter* set of instructions to integrate with the build plugin 4.0. Pull Request resolved: facebookincubator/fbjni#46 Test Plan: _eyes Reviewed By: fabiomassimo Differential Revision: D26545014 Pulled By: passy fbshipit-source-id: 67f111e60fc193d75351b70976abb452e33bf943
* Adding react-native-windows-write as the code owner * Adding jshost also as the code owner
How did you solve it? |
just use didn't use named capturing group because it doesn't have native support in hermes. Maybe in fresh version of hermes was implemented, I didn't check it. |
If any one still running this issue despite solutions mention above, I could sort it out adding he |
@juananime I tried adding |
what @juananime means is this |
I've tested this against the non-hermes version and it works fine. It seems that when I attempt to use my regex string it crashes the app:
I have an example application here: https://github.com/Kikketer/HermesRejex/blob/master/App.js#L22
It's very simple in the fact that it attempts to run a rejex against a string when you tap the "Hi There" text.
The simple app is right out of the
react-native init
except that it has hermes enabled and this new tap functionality.Also since reading regex can be painful, the string this matches would be:
The text was updated successfully, but these errors were encountered: