-
Notifications
You must be signed in to change notification settings - Fork 653
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
Support regex named capture groups #89
Comments
It's intentional. The list of features we target today is based on ES6 (the 2015 edition of the language specification): https://github.com/facebook/hermes/blob/master/doc/Features.md Named capture groups were added in the 2018 edition. We expect to support newer versions of the spec, including this feature, in the future, but we don't have a roadmap for this yet. We would be happy see PRs to add support for newer features which people are interested in. |
I just ran into this problem facebook/react-native#32453 but it's because of ansi-styles, any possible work arounds? |
Hello, could this feature be considered for the hermes roadmap? As more dependencies and libraries start incorporating named capture groups into their code, hermes will crash whenever it finds one of those deps. It is already occurring as discussed in chalk/ansi-styles#78 and chalk/ansi-styles#80. Thanks. |
I ran into this issue as well. If you're ending up here, facebook/react-native#32453 (comment) solved my problem. It would still be great if Hermes could support capture groups to the ES spec. Thanks! |
We produce proper debug binaries for debug builds now, so this wrapper is no longer necessary. This also addresses the issue where strings with embedded NUL characters would be truncated (due to the use of c_str instead of data/size).
It looks like the regex parser doesn't currently support named capture groups.
If you specify one, e.g.
it will throw a
SyntaxError: Invalid RegExp patterm: Quantifier has nothing to repeat, js engine: hermes
Is this intentional, or a bug?
The text was updated successfully, but these errors were encountered: