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

Regexp to emails too narrow #4

Open
flyhard opened this issue Oct 26, 2020 · 1 comment
Open

Regexp to emails too narrow #4

flyhard opened this issue Oct 26, 2020 · 1 comment

Comments

@flyhard
Copy link
Contributor

flyhard commented Oct 26, 2020

I noticed to problems when parsing emails:

  • international characters are not supported
  • the list of TLDs is incomplete/outdated.

Maybe hardcoding the TLDs shouldn't be done manually, but a generator be used if you can find some api that has all valid TLDs that exist - or you drop it for a much more simple regexp. That regexp would be having some false positives, but that might be ok.

I discovered that any regexp for emails more complex than '.+@.+.\S+' is rejecting valid email addresses.

@vertoforce
Copy link
Owner

Hey that's a great point! Thanks for pointing that out. I'll look in to that at some point :)

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

2 participants