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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
(?<email>[a-zA-Z][a-zA-Z0-9-_.]+\@[a-zA-Z][a-zA-Z0-9-_]+\.(?(?=[a-zA-Z]{2}\.)([a-zA-Z0-9-_]{2}\.[a-zA-Z0-9-_]{2})|([a-zA-Z0-9-_]{2,3})))
Description
This is a email validation group to fetch all the valid email address. If you want any expression then mail me at my id rahul_goel@kaleconsultants.com
Matches
sample@sample.com | sample@sample.co.in | sample@sample.uk
Non-Matches
sample.@sample | sample@com | sample
Author Rating: Not yet rated. Rahul Goel
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: doesn't match valid emails with one letter before @
Name: MiB
Date: 7/4/2007 6:59:59 PM
Comment:
(?<email>[a-zA-Z][a-zA-Z0-9-_.]+\@ needs to be changed to (?<email>[a-zA-Z][a-zA-Z0-9-_.]*\@ (pay attention to * at the end) if not, doesn't match a valid email: a@gmail.com (or any with one letter before @ )


Title: Fails on valid email addresses
Name: Randal L. Schwartz
Date: 11/22/2005 9:43:18 AM
Comment:
This fails on fred*barney@stonehenge.com, which is a valid email address. PLEASE STOP USING REGEX to validate email, unless you understand RFC822. The minimum regex to validate email is at http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html


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