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

Support for Non-Breaking Space Characters (NBSC) ? #530

Open
LucasMontorio opened this issue Oct 17, 2024 · 0 comments
Open

Support for Non-Breaking Space Characters (NBSC) ? #530

LucasMontorio opened this issue Oct 17, 2024 · 0 comments

Comments

@LucasMontorio
Copy link

LucasMontorio commented Oct 17, 2024

Hi everyone,

I ran into an issue while testing the following regex:

/(?:From)\s*:\s*(?:.*?<)?([^<>\s]+@[^>\s]+)(?:>)?/i

Against the following string:

'From :  John DOE <test@test.com>'

where the space character between 'From' and the column (‘:’) is a Non-Breaking Space Character (U+00A0 in Unicode).

While in a Ruby runtime this regex does not match anything because it explicitly looks for a series of regular whitespaces (\s), in the online tool there is a match.
I suppose this is because the NBSC character, when copy-pasted, is somehow sanitized into a tab character, which is then recognised as a valid whitespace.

Is there a way to add support for NBSCs in the tool? If not, does anyone have more information about the limitations at stake here? :)

Thanks a lot in advance.

PS: This was first mentioned in a little post where you can find a little more context if needed

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

No branches or pull requests

1 participant