2011/6/24 Lukas Fleischer <[email protected]>: > On Wed, Jun 22, 2011 at 10:11:28PM +0200, Cédric Girard wrote: >> On Wed, Jun 22, 2011 at 9:36 PM, Florian Pritz <[email protected]> wrote: >> >> > + return ( ! >> > preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", >> > $addy)) ? FALSE : TRUE; >> > >> >> Some legitimate email address will not be matched by your regexp. >> >> Better use built-in PHP functions: >> >> return filter_var($addy,FILTER_VALIDATE_EMAIL); > > I prefer this one. Given that the PHP release enabling filter extensions > by default was released about 4.5 years ago, I'd say we can push this. > > Objections? >
None objections. +1 for Cédric suggestion -- Angel Velásquez angvp @ irc.freenode.net Arch Linux Developer / Trusted User Linux Counter: #359909 http://www.angvp.com
