Re: email validation string.
| From: | Roman Neuhauser | Date: | Sat, 20 Jan 2007 15:04:44 +0000 |
| Subject: | Re: email validation string. | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-247441@lists.php.net to get a copy of this message | ||
# tedd@sperling.com / 2007-01-20 08:53:32 -0500:
> I picked this up in my travels.
>
> function validate_email($email)
> {
>
> // Create the syntactical validation regular expression
> $regexp =
> "^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-]+)*(\.[a-z]{2,4})$";
One of my email addresses is
neuhauser+pgsql-general#postgresql.org@sigpipe.cz.
Also, "[" ip-address "]" is a valid right hand side of an email address,
e. g.:
root@[127.0.0.1]
--
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man. You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991