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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@(([0-9a-zA-Z])+([-\w]*[0-9a-zA-Z])*\.)+[a-zA-Z]{2,9})$
Description
Email validation based on Rob Eberhardt's (Thanks, Rob!) email expression, but allows single letter subdomains...
Matches
bob@smith.com | bob@j.smith.museum | bob.smith@a-1.smith.com
Non-Matches
bob@.com | bob@-a.smith.com
Author Rating: Not yet rated. Shaune Stark
Source based on http://www.regexlib.com/REDetails.aspx?regexp_id=541
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: @@
Name: mike
Date: 9/18/2007 3:09:58 PM
Comment:
validates test@test@test.com and mike@test.com@test.com


Title: regular expression for a domain name.
Name: sunny
Date: 8/3/2007 4:35:41 AM
Comment:
regular expression for a domain name without www


Title: Best way to match email validation
Name: Sandeep H. Uke
Date: 10/3/2006 6:41:10 AM
Comment:
I found this regular expression is the best regular expression for email validation. Thanks for your code


Title: a
Name: a
Date: 2/12/2005 12:41:55 PM
Comment:
exellent


Title: Fails to match the valid email address
Name: The Fred and Barney Comedy Team <fred&barney@stonehenge.com>
Date: 1/26/2005 3:01:47 AM
Comment:
Fails to match the valid email address fred&barney@stonehenge.com


Title: Matches invalid email
Name: Alex Czartoryski
Date: 4/13/2004 3:18:01 PM
Comment:
Matches the following invalid e-mail: myname@vidéotron.ca


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