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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
[\w-]+@([\w-]+\.)+[\w-]+
Description
Yet another simple email validator expression.
Matches
joe@aol.com | a@b.c
Non-Matches
asdf | 1234
Author Rating: Not yet rated. Steven Smith
Source http://aspalliance.com/QuickStart/howto/doc/RegexCommon.aspx
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: Problem with underscore in domain name
Name: Helen
Date: 1/1/2013 10:47:41 AM
Comment:
\w includes the underscore and as I understand it is not to be used in domain name


Title: 4324
Name: 32423
Date: 9/19/2012 11:55:26 PM
Comment:
42342343


Title: 4324
Name: 32423
Date: 9/19/2012 11:55:07 PM
Comment:
42342343


Title: cleanAir
Name: huxop.com
Date: 1/13/2012 5:28:21 AM
Comment:
please use [\w-]+@{1}([\w-]+\.)+[\w-]+ To decline email-addresses with more than one "@" signs.


Title: Just needs three more characters...
Name: Bryan Miller
Date: 8/6/2009 7:02:44 PM
Comment:
A simple change to [\w\-.]+@([\w-]+\.)+[\w-\.]+ will allow for user names and domain names with dot in them. I.e. mr.foo@bar.baz.com. You must escape the hyphen in the [] or Perl thinks you are declaring a range...


Title: Just needs three more characters...
Name: Bryan Miller
Date: 8/6/2009 4:12:34 PM
Comment:
A simple change to [\w\-.]+@([\w-]+\.)+[\w-\.]+ will allow for user names and domain names with dot in them. I.e. mr.foo@bar.baz.com. You must escape the hyphen in the [] or Perl thinks you are declaring a range...


Title: Simple but good
Name: hfrmobile.com
Date: 6/6/2008 8:10:17 AM
Comment:
Since I had strange requirements in a project (test.test@test.test should be valid) this expression helped me. Does also allow ' in local part of e-mail address (RFC 2822).


Title: Simple but good
Name: hfrmobile.com
Date: 6/6/2008 8:08:44 AM
Comment:
Since I had strange requirements in a project (test.test@test.test should be valid) this expression helped me. Does also allow ' in local part of e-mail address (RFC 2822).


Title: WRONG WRONG WRONG
Name: Randal L. Schwartz
Date: 2/14/2008 8:26:46 AM
Comment:
Simple, and yet so very very wrong.


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