Re: More Email ereg Validation
| From: | Dan Wilson | Date: | Thu, 05 Apr 2001 16:59:57 +0000 |
| Subject: | Re: More Email ereg Validation | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-47286@lists.php.net to get a copy of this message | ||
: > : Here's a quick patch.. =3D)
: > : ([a-z0-9_\.\-]+)@([a-z0-9\.-]+).([a-z]{2}[a-z]?)
: > Does anyone else (a regex guru) have any other suggestions?
: I'm by no means an reg-exp-expert (hate these things)
: /[a-z0-9_.-]+@+[a-z0-9._-]+\.[a-z]{2,4}/i
: should do.
: -fkr
And the winner is.....
([a-z0-9_.-]+)@([a-z0-9._-]+)\.([a-z]{2,4})
Thanks Felix! It was all in the escaping of the dot that is outside of the
parens!
-Dan