Skip to content

RegExpJsToJavaConverter \p{L} Unicode property escapes #583

Description

@Jaaap

We have an HTML pattern that looks like this:

<input type="text" pattern="[\p{L}0-9 _'@&,?/]*"/>

Observe the \p{L}. This is a Unicode property escape for the Letter group.
The RegExpJsToJavaConverter.convert() method replaces this with [p\{L\}0-9 _'@&,?/]*.
Notice the missing backslash before the p and the added backslashed before the { and }.

Is it possible to fix this?
Also see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions/Unicode_property_escapes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions