List Info

Thread: Re: email verification regex question




Re: email verification regex question
country flaguser name
United States
2007-10-16 17:41:20
On Wednesday, 17 October 2007 6:55 AM, Hans <design5softflow.co.uk> wrote:
>I like to ask the regex experts if I got a regex right,
to be
>used for email verification.
>The email form field gets checked with preg_match
against this
>pattern:
>"/^([w+*!%&`^~$=/|{}-][.]?)+[w+*!%&`^~$=/
|{}-]+[w.-]+.[a-zA-Z]{2,4}$/i"
>
>This still will not catch any local part provided as a
quoted string,
>which is apparently allowed for email addresses, but not
much used.
>It shall allow alphanumeric and a number of special
characters
>     _+*!%&`^~$=/|{}-
>in the local part, and prohibit dots at the beginning or
the end of
>the local part, and repeated dots in the middle.
>it will also not catch any entries like:
>
>  Some Name <abcd.efghexample.com> bla bla
>  
>I am not sure if this important or should be allowed as
field entry.
>Or can this be achieved simply by omitting the  ^ $
beginning and end
>markers?
>At least it should catch any straight addresses without
spaces.

The following links may help:
http:/
/www.regular-expressions.info/email.html
http
://regexlib.com/REDetails.aspx?regexp_id=711


>  
>
> Hans
>


-- 
JR
--
John Rankin

       _      
        )   
         ,__/7
         /    /
        (   c'
           / 
     /,  /_/  
    |  & *   Wellington
    )  /    
   /  /,    
  /  (    
 |   /      
 __/       
   V        




_______________________________________________
pmwiki-devel mailing list
pmwiki-develpmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-devel

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )