RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Email Validator
Expression
^((?>[a-zA-Z\d!#$%&'*+\-/=?^_`{|}~]+\x20*|"((?=[\x01-\x7f])[^"\\]|\\[\x01-\x7f])*"\x20*)*(?<angle><))?((?!\.)(?>\.?[a-zA-Z\d!#$%&'*+\-/=?^_`{|}~]+)+|"((?=[\x01-\x7f])[^"\\]|\\[\x01-\x7f])*")@(((?!-)[a-zA-Z\d\-]+(?<!-)\.)+[a-zA-Z]{2,}|\[(((?(?<!\[)\.)(25[0-5]|2[0-4]\d|[01]?\d?\d)){4}|[a-zA-Z\d\-]*[a-zA-Z\d]:((?=[\x01-\x7f])[^\\\[\]]|\\[\x01-\x7f])+)\])(?(angle)>)$
Description
This accepts RFC 2822 email addresses in the form:<br> [email protected] OR<br> Blah &lt;[email protected]&gt;<br> <br> RFC 2822 email 'mailbox':<br> mailbox = name-addr | addr-spec<br> name-addr = [display-name] "<" addr-spec ">"<br> addr-spec = local-part "@" domain<br>
Matches
[email protected] | Name Surname <[email protected]> | "b. blah"@blah.co.nz
Non-Matches
name [email protected] | name."surname"@blah.com | [email protected]
Author Rating: The rating for this expression. Kunal Chowdhury
Source Email
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Fails JavaScript Syntax
Name: Gerald
Date: 7/13/2013 3:14:07 PM
Comment:
This seems promising but can't use in JavaScript


Title: bug
Name: Ashkan
Date: 10/6/2012 7:38:00 AM
Comment:
It matches Blahh@gmailasdasdsadadsasdasdasdasd.comadsasdasdasdadasd.adasd.asdasd.asdasd.adasdad.asdasdasd.ad.asdadasdas.asdsa


Title: bug
Name: Ashkan
Date: 10/6/2012 6:34:16 AM
Comment:
It matches Blahh@gmailasdasdsadadsasdasdasdasd.comadsasdasdasdadasd.adasd.asdasd.asdasd.adasdad.asdasdasd.ad.asdadasdas.asdsa


Title: bug
Name: Ashkan
Date: 10/6/2012 6:33:50 AM
Comment:
It matches Blahh@gmailasdasdsadadsasdasdasdasd.comadsasdasdasdadasd.adasd.asdasd.asdasd.adasdad.asdasdasd.ad.asdadasdas.asdsa


Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials