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]+[\-_\.]*)\.(?:[a-zA-Z]{2,}?))$
Description
This validates an email address and only an email address. None of the <email> stuff, just [email protected]. Comments are more then welcome.
Matches
Non-Matches
Author Rating: Not yet rated. netFiends.com
Source netFiends.com
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: STOP using regex to validate email
Name: Randal L. Schwartz
Date: 11/20/2005 5:53:40 PM
Comment:
This fails on fred*[email protected], for example. If you don't know RFC822 (or haven't even heard of RFC822), DO NOT WRITE EMAIL VALIDATION REGEXEN. THEY ARE WRONG.


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