email regex

filled under:
February 23, 2008 

if you need a very easy regex, to validate emails – here’s some I wrote:

^((?P<localpart>([\w\-_]+)([\w\-_]+([\.]{1}[^\.\.]+))([\w\-_]+))
@(?P<domain>([\wäüö]+[\w\-\._äüö]+[\wäüö]+))
\.(?P<tld>([a-z]{2,6})))$

Leave a Reply

Your email address will not be published.Required fields are marked bold.

You may use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>