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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Email matcher
Expression
([^_.]([a-zA-Z0-9_]*[.]?[a-zA-Z0-9_]+[^_]){2})@([a-z0-9]+[.]([a-z]{2,3}|[a-z]{2,3}[.][a-z]{2,3}))
Description
This is a cleanup of Vijay Joshi's "Email" pattern. It matches the same characters that his does, but matches them anywhere in the line. It adds useful substitution groups -- [1] - username portion of email (before @), [3] domain portion of email - after the @. It also was a bit overly-complex, so I reduced this as well.. Remember -- if you're planning to use this with something that uses 1003.2 BREs, you'll have to backquote + | ? ( ) { and }.
Matches
Non-Matches
Author Rating: Not yet rated. Kamaji
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: WRONG WRONG WRONG
Name: Randal L. Schwartz
Date: 8/2/2007 5:42:14 PM
Comment:
Once again, a regex written by someone WHO HAS APPARENTLY NOT SEEN RFC822. PLEASE STOP POSTING EMAIL REGEX TO THIS SITE. Or at least get a clue first. RFC822 isn't that hard to find.


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