Re: Validation Email in PHP programs
| From: | Johannes Janson | Date: | Tue, 03 Apr 2001 13:06:10 +0000 |
| Subject: | Re: Validation Email in PHP programs | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-46804@lists.php.net to get a copy of this message | ||
Hi,
this is the regular expression from a PHP book.
ereg("^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@([a-zA-Z0-9-]+\.)+([a-zA-z]{2,3})$,
$formfield");
looks horrible but works.
"Sharat Hegde" <shah@sonata-software.com> schrieb im Newsbeitrag
news:30402B4CB8C7D311A3C600C04F1513BC3BDAE4@bg2ipmail...
> Hello,
>
> I am trying to validate the email address in my PHP program using the ereg
> function. I have different combinations of regular expressions to get the
> chunks of the email substring before and after the @ symbol and the dot
(.)
> character. However, this does not seem to work.
>
> Can anyone suggest a method using ereg or otherwise to validate the email
> address in a PHP program?
>
> Regards,
> Sharat Hegde
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>