note 5432 deleted from function.mail by jimw

From: Date: Wed, 31 Oct 2001 23:00:34 +0000
Subject: note 5432 deleted from function.mail by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-19854@lists.php.net to get a copy of this message
It's interesting to see, how my first post for a regular expression for e-mail checking some months ago (on the ereg() manual page) evolved over time... This was my original check (simple but correct): eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}$",$email) and these is the "evolved" one with additions thanks to r.garcia@netia.net: >eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@([0-9a-z][0-9a-z-]*[0-9a-z]\.)+[a-z]{2}[mtgvu]?$", >$email) All other contributions are broken in some way and fail to validate correct addresses as: 123-@xxx.com, _a_@xxx.com or a@aa.bb.cc.dd.co.uk. Hope this helps! Markus Senoner

« previous php.notes (#19854) next »