Skip to content

Closure compiler doesn't recognize \u{XXXX} in regular expression #3563

Closed
@upsuper

Description

@upsuper

The following code:

let x = /\u{ffff}/u;

would yield:

WARNING - [JSC_MALFORMED_REGEXP] Malformed Regular Expression: {ffff}

from closure compiler, but it's a valid regular expression, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Character_Classes

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueRelatively easy, but low priority bugs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions