Title |
Test
Find
Pattern Title
|
Expression |
^((([a-zA-Z\'\.\-]+)?)((,\s*([a-zA-Z]+))?)|([A-Za-z0-9](([_\.\-]?[a-zA-Z0-9]+)*)@([A-Za-z0-9]+)(([\.\-]?[a-zA-Z0-9]+)*)\.([A-Za-z]{2,})))(;{1}(((([a-zA-Z\'\.\-]+){1})((,\s*([a-zA-Z]+))?))|([A-Za-z0-9](([_\.\-]?[a-zA-Z0-9]+)*)@([A-Za-z0-9]+)(([\.\-]?[a-zA-Z0-9]+)*)\.([A-Za-z]{2,})){1}))*$ |
Description |
This regular expression matches a series of names and/or email addresses much like you would do in Outlook's To field (e.g. To: [email protected];miles, er;roemer;lagrander, nitra). The first entry must be a name (in the form of last name followed by a comma and first name) or an email address. The following entries are a semicolon followed by one name or email address. The comma and first name are optional components of the name part. |
Matches |
|
Non-Matches |
|
Author |
Rating:
Not yet rated.
William Rohrbach
|
Source |
The email address validation portion is based on the email regular expression submitted by bilou mcgyver. |
Your Rating |
|
Title: Excellent
Name: C Smith
Date: 6/30/2006 3:46:24 PM
Comment:
Serves my needs well :-)
Title: Excellent!
Name: Ben Roberts
Date: 3/8/2005 2:23:15 PM
Comment:
Could anyone out there modify this so that it would only allow valid non-Outlook email structures separated by semi-colons? Apparently, I'm not smart enough!!!!
Thanks for the pattern William!