This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Developer » e-mail validation - are you serious??
expandshrink

e-mail validation - are you serious??

e-mail validation - are you serious??

Friday 26 September 2003 2:42:29 pm - 1 reply

ereg('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'.'@'.'[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.'.'[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $address) );

this allows quite everything, @ and . given!

I think that comes much closer (and simpler!), but likely to be improved. Comments welcome (preg):
^[a-z0-9][-._a-z0-9]*@(?:[a-z0-9][-_a-z0-9]*\.)+[a-z]{2,4}$

Friday 26 September 2003 4:44:15 pm

Yeah

But email urls like mailto:thomas@somewhere.com?subject=You%20love%20preg
should also be possible

-paul

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from