Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I've seen a much longer one. Emails in regex are crazy if you want to cover all possibilities.
-
evertiro6528y@jirehstudios I use one in one of my projects... a year and change in and it's still getting tweaked
-
Voxera115858yToday regex for anything but a rough check for a @ and a . is dead.
Before international domain names a standards compliant regex was around 4K chars long.
With international I dont think it is possible. How does regex handle chineese?
There are so many options that even dedicated libraries fails pn edge cases.
Inactually dont know of a library that manages all of our testcases. But we have one that handles all but a few. -
elbaloo438yJust send a damn message to verify/activate... It's them who should make sure it's entered correctly.
-
I don't really get the point of such complicated checks.
Is it to just confirm the email was written correctly and want to avoid asking the user to enter it twice? -
Voxera115858y@Letmecode only way to stay current.
Any other will probably be out of date once you get it in production ;) -
What do you mean you found it on facebook. Do you go there when you have questions?
-
Checking for a valid email like that is pretty useless Imo. There is no definitive way to be 100% sure so sending an actual email is your best option
-
balambuc1308yRead David Gilbertson's two-part email verification post/rant on Medium, he expailns quite well, why most email verif regexes catch only a very very small fraction of valid, but incorrect addresses
Related Rants
Use regex, they said. It's better, they said.
Found this on Facebook.
undefined
regex