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]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$
Description
A short and sweet email address validator. Checks that the username starts and ends with an alphanumeric character, allows a few non-repeating 'special characters' (namely -, ., _, +, &) and checks for a sensible domain name (2-6 character TLD required). Some unconventional, yet technically valid, addresses will not be matched, but this is only a simple expression ;-)
Matches
Non-Matches
[email protected] | spammer@[203.12.145.68] | bla@bla
Author Rating: The rating for this expression. Luke Arms
Source
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: Worked right off the bat!
Name: Amber
Date: 9/10/2013 9:50:57 AM
Comment:
Great expression! saved me alot fo time and frustration!


Title: Disregard my previous message
Name: Andrew
Date: 8/5/2009 11:31:47 AM
Comment:
I'm so sorry...


Title: Pretty good but...
Name: Andrew
Date: 8/5/2009 11:30:15 AM
Comment:
It doesn't validate [email protected]. Question: Is this '-' before the zero necessary? ...Z]+@([-0...


Title: Simple and effective!
Name: Gaz
Date: 1/24/2006 4:20:06 AM
Comment:
Works a treat, cheers.


Title: Last comment
Name: Maarten
Date: 10/25/2005 8:59:50 AM
Comment:
e.dk is a existing domain, and smaller than 3 characters. Just FYI.


Title: little change
Name: Lars Echterhoff
Date: 8/31/2005 2:50:19 PM
Comment:
...to make this Validator work better. Check for domainnames greater than 3 characters... cause [email protected] is not really a valid emailaddress...


Title: Bostin'
Name: Dave G
Date: 8/31/2005 10:19:05 AM
Comment:
Simple effective, top!


Title: Thanks!!
Name: Dabbler
Date: 7/22/2005 3:59:16 PM
Comment:
Thanks!! This is the first one that i have come across that does not melt my brain and works :)


Title: Finally
Name: Randy Charles Morin
Date: 7/19/2005 12:43:21 PM
Comment:
Wow, this is the first one that I found that doesn't have reject obviously valid email address. Not perfect, doesn't work with IP address, but I'm not interested in that.


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