Skip to content

RegExpJsToJavaConverter \p{L} Unicode property escapes #583

@Jaaap

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

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