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-]+\.([\w-]+\.)*?[\w]+$
Description
The following pattern checks whether the input string is a valid email address in the form "name@domain.com". Actually, it does not have to be a ".com" address. Any combination of letters following the last period are fine. Also, the email name can have a dash or be separated by one or more periods. The Domain name can also have multiple words separated by periods. Thus, it will validate bob@hotmail.com and bill.michaels@us.office.gov.
Matches
name@domain.com | name.name2@domain.com | name.name2@sub.domain.com
Non-Matches
name.@domain.com | name@.domain.com | .name@domain.com
Author Rating: Not yet rated. Aleksandar Boros
Source MS.NET Sample How-To Use Regular Expressions
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

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