"Jami Moore" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I have been trying all weekend to get this right, and so far it does not
> validate an e-mail address with a subdomain.
>
> -- Code --
>
> $empatt =
> "^[_a-z0-9-]+(\.[_a-z0-9-]+)[EMAIL PROTECTED](\.[a-z0-9-]+)*(\.[a-z]{2,3})$";
>
>  if(eregi($empatt, $email))
>    {
>         //do stuff
>    }
>
> -- End Code --
Try this pattern (which I use):

"[EMAIL PROTECTED],4}$"

HTH,

Ivo

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to