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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find E-mail validation
Expression
^[a-zA-Z][a-zA-Z0-9_\.\-]+@([a-zA-Z0-9-]{2,}\.)+([a-zA-Z]{2,4}|[a-zA-Z]{2}\.[a-zA-Z]{2})$
Description
This will validate most legal e-mail adresses with the correct syntax.
Matches
Non-Matches
[email protected] | name&@website.net | blahblah@website
Author Rating: Not yet rated. Viktor Nagy
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: Minor problem with addressee length
Name: Larry Schuldt
Date: 12/9/2010 10:25:22 AM
Comment:
This regex will fail with a 1-character addressee length ([email protected]). My proposal is a trival tweak to fix this. "^[a-zA-Z][a-zA-Z0-9_\.\-]*@([a-zA-Z0-9-]{2,}\.)+([a-zA-Z]{2,4}|[a-zA-Z]{2\.[a-zA-Z]{2})$"


Title: Minor problem with addressee length
Name: Larry Schuldt
Date: 12/9/2010 10:24:12 AM
Comment:
This regex will fail with a 1-character addressee length ([email protected]). My proposal is a trival tweak to fix this. "^[a-zA-Z][a-zA-Z0-9_\.\-]*@([a-zA-Z0-9-]{2,}\.)+([a-zA-Z]{2,4}|[a-zA-Z]{2\.[a-zA-Z]{2})$"


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