Re: Regex for email validation
| From: | Per Jessen | Date: | Thu, 28 Aug 2008 07:28:39 +0000 |
| Subject: | Re: Regex for email validation | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-278858@lists.php.net to get a copy of this message | ||
Kevin Waterson wrote:
> There is no silver bullet regex to validate all RFC compliant email
> address. Many have tried, but they all fail at some point. The best
> you can do is cater to most _sane_ addresses.
>
Exactly - the regex is a quick/cheap sanity check, nothing more. To go
all the way, you could try doing an SMTP VRFY against the MX for the
domain, but it's really taking it a bit too far.
/Per Jessen, Zürich