News for hackers. Stuff that matters.
Re:Is it a must for every programmer to learn regular expres... by InclinedPlane on Thursday August 16, 2012 @04:52AM (#4390489)
/i
Re:Is it a must for every programmer to learn regular expres... by subsystem on Thursday August 16, 2012 @05:09AM (#4390523)
There's characters missing[1] and the tld is too short[2]. And even if that's fixed, we still don't match internationalized addresses or actually validate that the e-mail address exists. You're probably better off with something like...

   if "@" in email and "." in email.split("@")[1]:
       send_verification(email)
...but you should probably also check for common misspellings like "gmial.com" etc.

[1] http://en.wikipedia.org/wiki/Email_address#Syntax [2] http://en.wikipedia.org/wiki/List_of_Internet_top-level_doma...