Posted By

Scooter on 08/02/08


Tagged


Versions (?)

Who likes this?

7 people have marked this snippet as a favorite

nickdoherty
dmitryfstyleca
jeremyhcobb
kurokikaze
qbnrox
pezland
banjomamo


Validate e-mail address


 / Published in: Regular Expression
 

URL: http://reusablecode.blogspot.com/2008/08/isvalidemail.html

Supports quoted local part, IP address for the domain part, and top-level domains in excess of six characters in case one is ever created. Refer to the linked blog post for a broken-down explanation of the different components of the pattern.

  1. ^((([\w\+\-]+)(\.[\w\+\-]+)*)|(\"[^(\\|\")]{0,62}\"))@(([a-zA-Z0-9\-]+\.)+([a-zA-Z0-9]{2,})|\[?([1]?\d{1,2}|2[0-4]{1}\d{1}|25[0-5]{1})(\.([1]?\d{1,2}|2[0-4]{1}\d{1}|25[0-5]{1})){3}\]?)$

Report this snippet  

You need to login to post a comment.