[aur-dev] [PATCH 2/5] use valid_email() from codeigniter's email helper

Lukas Fleischer archlinux at cryptocrack.de
Fri Jun 24 10:02:47 EDT 2011


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 <bluewind at xinu.at> 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?


More information about the aur-dev mailing list