Skip to content

Support for ES2018 Unicode character class escapes #1027

@birdofpreyru

Description

@birdofpreyru

Bug Description

new RegExp(/\p{P}/, 'u') in JS code crashes React Native when using Hermes, throwing SyntaxError: Invalid RegExp: Invalid escape; and it works fine with JSC. \p{P} is the Unicode character class escape for punctuation.

  • I have run gradle clean and confirmed this bug does not occur with JSC

Hermes version: the one bundled with RN 0.71.10
React Native version (if any): 0.71.10
OS version (if any):
Platform (most likely one of arm64-v8a, armeabi-v7a, x86, x86_64):

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestes2018es2018+ compatibility

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions