Hello, On 06/13/2002 11:49 PM, Timothy J. Luoma wrote: > 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"?
The following classes use this validation regular expression string. It does not exclude some invalid addresses but includes all valid addresses. "^([-!#\$%&'*+./0-9=?A-Z^_`a-z{|}~?])+@([-!#\$%&'*+/0-9=?A-Z^_`a-z{|}~?]+\\.)+[a-zA-Z]{2,4}\$" Forms generation and validation http://www.phpclasses.org/formsgeneration E-mail address validation http://www.phpclasses.org/emailvalidation -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php