That one does not accept '+'. In fact, that was the 1st time I ever saw
such a character in an e-mail address. I did not check the RFC, but if it is
valid, just add the '+' char to the reg. exp. like this:
function mailCheck($strEMailAddress)
{
return eregi("^[_a-z0-9+-]+(\.[_a-z0-9+-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$",
$strEMailAddress);
}
This should now accept your mail address.
Regards,
Pedro Alberto Pontes
----- Original Message -----
From: "Timothy J. Luoma" <[EMAIL PROTECTED]>
Newsgroups: php.general
To: "Pedro Pontes" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, June 14, 2002 04:49
Subject: Re: Email validation
> On Wed, 12 Jun 2002, Pedro Pontes wrote:
>
> > function checkEmail($strEMailAddress)
> > {
> > return eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$",
> > $strEMailAddress);
> > }
> >
> > You have it now :).
>
> I'm still learning my PHP regex... does the above allow someone to have a
> literal "+" in their email address, ala <[EMAIL PROTECTED]> which is
> perfectly valid, but often rejected by "email validators"?
>
> TjL
>
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php