Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tayflo opened this issue May 5, 2020 · 1 comment · May be fixed by #471
Open

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

tayflo opened this issue May 5, 2020 · 1 comment · May be fixed by #471

Comments

@tayflo
Copy link

tayflo commented May 5, 2020

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 🙂

@iansan5653
Copy link

I wrote a library a while back that might be helpful for resolving this depending on how the escape sequences are being handled - https://github.com/iansan5653/unraw.

stevenwdv added a commit to stevenwdv/regexr that referenced this issue Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants