News for hackers. Stuff that matters.
Re:Email Regex that works 99.99% by tom-lord on Monday February 23, 2015 @05:15AM (#9093477)
As others have suggested, the best "standardised regex" solution would just be something like:

    /.*@.*/
Some people aren't happy with this because it allows invalid emails to be entered. But the alternative - such as what's being attempted here - is a nightmare!

Even if there was a standardised regex for all emails, which would not break when new TLDs are released, or new unicode characters are supported, or whatever, there would still be no guarantee that [email protected] is actually valid!

Your best bet is to simply allow users to enter anything (with perhaps some minor regex check like I did above), perhaps ask them to enter it twice, and perhaps send an account validation email.

There are no comments on this comment yet.