Re: Regex for email validation
| From: | Per Jessen | Date: | Wed, 27 Aug 2008 07:31:45 +0000 |
| Subject: | Re: Regex for email validation | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-278760@lists.php.net to get a copy of this message | ||
VamVan wrote:
> Hello Guys,
>
> Does any have a regex for email validation? I need to allow only
> period and underscore in the local part , we would need a @ and .com
> or watever for domain.
Option 1: /^[_.]+@[a-z0-9-]+\.com$/
This is probably what you meant:
/^[a-z0-9_.]+@[a-z0-9-]+\.com$/
/Per Jessen, Zürich