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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Email - Overly Simple
Expression
^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$
Description
Simple email expression. Doesn't allow numbers in the domain name and doesn't allow for top level domains that are less than 2 or more than 3 letters (which is fine until they allow more). Doesn't handle multiple "." in the domain (joe@abc.co.uk).
Matches
joe@aol.com | ssmith@aspalliance.com | a@b.cc
Non-Matches
joe@123aspx.com | joe@web.info | joe@company.co.uk
Author Rating: The rating for this expression. Steven Smith
Source http://www.4guysfromrolla.com/webtech/120400-1.shtml
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: Doesn't allow + sign
Name: Anonyme
Date: 10/16/2013 10:42:07 AM
Comment:
"+" is a valid in email... Has been valid since 1982(!) see RFC 822(http://www.faqs.org/rfcs/rfc822.html)


Title: Too simple
Name: menaceMort
Date: 6/30/2011 7:33:29 AM
Comment:
E.g. does not match: king-bart@home.simpsons.com bart@simpsons.info


Title: and Museum ? .asia, .travel ?
Name: niwan
Date: 4/5/2011 5:09:23 PM
Comment:
simple but too much leaks.


Title: ?
Name: Darkan
Date: 8/18/2010 10:16:28 AM
Comment:
Why did you put that question mark there? ("[a-zA-Z _]+?") +:one or many ?:zero or one


Title: ?
Name: Darkan
Date: 8/18/2010 10:15:05 AM
Comment:
Why did you put that question mark there? ("[a-zA-Z _]+?") +:one or many ?:zero or one


Title: ?
Name: Darkan
Date: 8/18/2010 10:14:46 AM
Comment:
Why did you put that question mark there? ("[a-zA-Z _]+?") +:one or many ?:zero or one


Title: Overly simple? Not very useable, so what's the point?
Name: JJ
Date: 7/2/2009 5:55:52 PM
Comment:
There are too many things wrong with this regex to even consider using it. The fact that this regexp doesn't allow numbers, hyphens, or more than one period in the domain name makes it pretty useless for me. The first part of the address is also too restrictive. I'd rather not lose business rejecting sales from customers because this regexp is sure to fail some of them.


Title: Simple
Name: Mitch
Date: 2/27/2009 7:56:51 AM
Comment:
Not a bad regex overall, the only thing I might change, is to allow the "." in the name, and change the range of the domain from {2,3} to {2,4} since there are some email addresses like test.user@mydomain.info. Good job.


Title: expration
Name: eman
Date: 12/24/2007 6:15:55 AM
Comment:
i need regular experssion for the password to allow only even password and must be complex


Title: safd
Name: sdf
Date: 12/6/2007 9:43:58 AM
Comment:
sadf


Title: wht6411@126.com ia a email
Name: 武海涛
Date: 10/15/2007 9:10:57 PM
Comment:
why not match?


Title: friend
Name: siyahgulmersin
Date: 9/4/2007 6:25:46 AM
Comment:
girls friend


Title: bug
Name: Antonello
Date: 4/22/2007 9:17:11 AM
Comment:
It doesn't work with names that contain dot. For example: myname.mysurname@someplace.com


Title: Expression doesn't work
Name: Ian Eiloart
Date: 8/21/2006 11:49:42 AM
Comment:
This expression is useless. Underscores are NOT permitted in email domains. There's no restriction on the length of the top level domain. For example, .info and .museum are now in use.


Title: code
Name: rai
Date: 7/18/2006 1:56:23 AM
Comment:
i need the coxde sheet of this output


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