GithubHelp home page GithubHelp logo

Comments (8)

fonov avatar fonov commented on April 24, 2024 25

For me, i encountered an error when use named capturing group in regex

(?<Name>x)

from hermes.

avp avatar avp commented on April 24, 2024 10

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:
https://github.com/facebook/hermes/blob/master/doc/RegExp.md

from hermes.

Kikketer avatar Kikketer commented on April 24, 2024 7

I've discovered the issue, I needed to add some "seemingly useless" escapes. Just a challenge with different regex parsers:

/{{2}/

turned to:

/\{{2}/

Fixes the issue. Just something to note for any other developer out there that has some regex and it's only failing on Hermes.

from hermes.

juananime avatar juananime commented on April 24, 2024 3

If any one still running this issue despite solutions mention above, I could sort it out adding he @babel/preset-env to the dev dependencies, apparently, that babel has de plugin that fixes this reg exp issue

from hermes.

samzmann avatar samzmann commented on April 24, 2024 2

@juananime I tried adding @babel/preset-env, rebuild, restart packager, etc. but still same issue. Can you plz give a little more details about what you did to get your regex working?

from hermes.

hanancs avatar hanancs commented on April 24, 2024

For me, i encountered an error when use named capturing group in regex

(?<Name>x)

How did you solve it?

from hermes.

fonov avatar fonov commented on April 24, 2024

For me, i encountered an error when use named capturing group in regex
(?<Name>x)

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.

from hermes.

visitsb avatar visitsb commented on April 24, 2024

what @juananime means is this

from hermes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.