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

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 1
Title Test Details 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
   Displaying page 1 of 1 pages; Items 1 to 1

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