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[\.\-\+]?){0,62})\w)+)\.(\w{2,6})$
Description
Not a 100% email validation. It doesn't work with IP-Adresses, but it's good for most common cases. At least I hope so.
Matches
Non-Matches
Author Rating: Not yet rated. Sebastian Hiller
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: Fails to match valid email address
Name: The Fred and Barney Comedy Team <fred&[email protected]>
Date: 1/26/2005 3:04:31 AM
Comment:
Fails to match the valid email address fred&[email protected]


Title: Small Improvement
Name: Sebastian Hiller
Date: 3/3/2004 2:29:47 AM
Comment:
The original expression accepts adresses like ___@___.__ , this should work better: ^((?:(?:(?:[a-zA-Z0-9][\.\-\+\_]?)*)[a-zA-Z0-9])+)\@((?:(?:(?:[a-zA-Z0-9][\.\-\_]?){0,62})[a-zA-Z0-9])+)\.([a-zA-Z0-9]{2,6})$ But one problem remains: the max length of the Domainname is not correctly defined.


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