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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Email or Recipent To or Names
Expression
((?i)(?<=\b(^to |^to:|^to;):?)[^:].+?$)+(\b[-\w]{2,40}(\.[-\w]{1,40}){0,5}@[-\w]{2,40}(\.[-0-9a-zA-Z]{2,20}))*\b
Description
Finds names or eMail address when reference in text. Must start with TO, or you can change to ->from, cc, bcc, and so on. email address are validated against @ but NOT domain; domain isnt validated. Test and comment plz
Matches
[email protected] | you@me | First Last [email protected]| First Last/weird/lotusnotes/name@domain
Non-Matches
To you and me from now on, [email protected]
Author Rating: Not yet rated. A Ruiz
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

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