note 42712 rejected from function.ereg by curt
| From: | curt@php.net | Date: | Tue, 06 Jul 2004 03:55:25 +0000 |
| Subject: | note 42712 rejected from function.ereg by curt | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-72679@lists.php.net to get a copy of this message | ||
Note Submitter: Zach Johnson
----
Most of the regular expressions to validate email addresses posted here are incorrect. I suggest
you check RFC 2822.
Consider the following as much better:
/^[-^!#$%&'*+\/=?`{|}~.\w]+@[-a-zA-Z0-9]+(\.[-a-zA-Z0-9]+)+$/
cheers,
Zach