Skip to content

Unicode char code \u{code} not recognized when it contains letter #358

@tayflo

Description

@tayflo

Hello there. First of all thanks a lot for RegExr, it's such a great and easy-to-use tool, it's almost a daily companion for me 👍

Description

I noticed a little bug: using unicode flag, unicode escaped characters that contains letters in their code don't print properly in the explanation box (both in the "Explain" tab in the tools box at the bottom, and in the expression input box on top).

Example

Looking for character \u{0020} (/\u{0020}/u), it matches perfectly space character, no problem.

Looking for character \u{002A} (/\u{002A}/u)

  1. it matches asterisk (*) characters in the text box, "Replace", "List", "Details" tools tab (no prob)
    BUT
  2. it displays the following error message in the "Explain" tab and the Expression box:

\u ERROR: Invalid escape sequence.

(And I know that brackets are not needed for four-char long unicode codes and \u002A works fine, but I use them for five-char long ones and the bug is the same.)

Thanks again for your time 🙂

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions