[pLog-svn] Email Regex

Oscar Renalias oscar at renalias.net
Tue Jul 18 16:38:42 GMT 2006

I don't like to depend on PEAR either but if we can extract their  
validation code and integrate it into our own validation framework, I  
think it could be a good idea.

Try and have a look at the code and if it's not too complicated,  
please go ahead.

On 18 Jul 2006, at 18:04, Jon Daley wrote:

> 	I would bet we don't want to depend on PEAR for just email  
> validation.  We want to have as minimum external dependencies as  
> possible.
> What are the invalid email addresses that pass the regex?
> We could change it to this pretty easily:
> "^[a-z0-9]*([_.+-]+[a-z0-9])+@[a-z0-9]+([-.]?[a-z0-9])+\.[a-z]{2,4}"
> The full expression from the RFC is about a page long, we could  
> include that if needed to.  I think it is overkill for the real world.
> On Tue, 18 Jul 2006, Ammar Ibrahim wrote:
>> The regex for the email validation rule is flawed.
>> "^[a-z0-9]*([-_.+]?[a-z0-9])+@[a-z0-9]+([-.]?[a-z0-9])+\.[a-z] 
>> {2,4}");
>> Not only some invalid emails pass this regex, yet worse, some  
>> valid emails
>> don't pass e.g. (ab__ar at hotmail.com, note the double underscores)
>> My suggestion would be to use the PEAR email validator, I've used  
>> it quite
>> alot and it looks to be very good and intensive. The validator  
>> package is
>> big, so we can just take the email validation part and integrate  
>> it in
>> LifeType. If this is what we agree on, I can work on this and send  
>> you the
>> code.
>> - Ammar
> -- 
> Jon Daley
> http://jon.limedaley.com/
> "Diplomacy" is letting them have it your way.
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn

More information about the pLog-svn mailing list