By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,833 Members | 2,067 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,833 IT Pros & Developers. It's quick & easy.

Validate Email Address Using Regular Expressions

P: n/a
HELLO
I am using the following MICROSOFT SUGGESTED (somewhere on msdn)
regular expression to validate email addresses however I understand
that the RFP allows for "+" symbols in the email address and this
method does not....

Does anyone have an explanation?
Function IsValidEmail(ByVal strIn As String) As Boolean
' Return true if strIn is in valid e-mail format.
Return Regex.IsMatch(strIn,
("^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$"))
End Function
THANKS
RYAN
Nov 21 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Hi Ryan!

"Ryan" schrieb
I am using the following MICROSOFT SUGGESTED (somewhere on msdn)
regular expression to validate email addresses however I understand
that the RFP allows for "+" symbols in the email address and this
method does not....

Does anyone have an explanation?


A real RFC-822-compliant regex ist very big and complicated.

Have a look at this:
http://www.codeproject.com/csharp/RFC822Validator.asp

This is the one and only RFC-822-compliant regex:

[\040\t]*(?: \( [^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\x80-\
xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] *)*\))
[^\\\x80-\xff\
n\015()] *)*\)
[\040\t]* )*(?'mailbox'(?'localpart'(?:[^(\040)<>\@,;:\".\\\[\]\0
00-\037\x80-\xff]+(?![^(\040)<>\@,;:\".\\\[\]\000-\037\x80-\xff])|(?'quotedstr'\
"[^\\\x80-\xff\n\015"] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )*\"))
[\04
0\t]*(?: \( [^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\x80-\xff\
n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] *)*\))
[^\\\x80-\xff\n\01
5()] *)*\) [\040\t]* )*(?:\. [\040\t]*(?: \( [^\\\x80-\xff\n\015()] *(?:(?:
\\
[^\x80-\xff] | \( [^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff]
[^\\\x80-\xff\n
\015()] *)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*
(?:[^(\040)<>\@,;:\".\\
\[\]\000-\037\x80-\xff]+(?![^(\040)<>\@,;:\".\\\[\]\000-\037\x80-\xff])|(?'quote
dstr'\"[^\\\x80-\xff\n\015"] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"]
* )*\")
) [\040\t]*(?: \( [^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\x80
-\xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] *)*\))
[^\\\x80-\xf
f\n\015()] *)*\) [\040\t]* )*)*) \@ [\040\t]*(?: \( [^\\\x80-\xff\n\015()]
*(?:(
?: \\ [^\x80-\xff] | \( [^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff]
[^\\\x80
-\xff\n\015()] *)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*
(?'domain'(?:[^(
\040)<>\@,;:\".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>\@,;:\".\\\[\]\000-\037\x8
0-\xff])|\[(?: [^\\\x80-\xff\n\015\[\]"] | \\
^\x80-\xff] )*\])[\040\t]*(?: \
( [^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\x80-\xff\n\015()] *
(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] *)*\)) [^\\\x80-\xff\n\015()]
*)*\)
[\040\t]* )*(:?\. [\040\t]*(?: \( [^\\\x80-\xff\n\015()] *(?:(?: \\
[^\x80-\xf
f] | \( [^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff]
[^\\\x80-\xff\n\015()] *)
*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*
(?:[^(\040)<>\@,;:\".\\\[\]\000-\
037\x80-\xff]+(?![^(\040)<>\@,;:\".\\\[\]\000-\037\x80-\xff])|\[(?:
[^\\\x80-\xf
f\n\015\[\]"] | \\ [^\x80-\xff] )*\])[\040\t]*(?: \(
[^\\\x80-\xff\n\015()] *(
?:(?: \\ [^\x80-\xff] | \( [^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff]
[^\\\
x80-\xff\n\015()] *)*\)) [^\\\x80-\xff\n\015()] *)*\)
[\040\t]* )*)*)|(?:[^(\040
)<>\@,;:\".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>\@,;:\".\\\[\]\000-\037\x80-\x
ff])|(?'quotedstr'\"[^\\\x80-\xff\n\015"] *(?: \\ [^\x80-\xff]
[^\\\x80-\xff\n\
015"] * )*\"))[^()<>\@,;:\".\\\[\]\x80-\xff\000-\010\012-\037](?:(?: \(
[^\\\x80
-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \( [^\\\x80-\xff\n\015()] *(?: \\
[^\
x80-\xff] [^\\\x80-\xff\n\015()] *)*\)) [^\\\x80-\xff\n\015()] *)*\) |
(?'quot
edstr'\"[^\\\x80-\xff\n\015"] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"]
* )*\"
) )[^()<>\@,;:\".\\\[\]\x80-\xff\000-\010\012-\037] *)* < [\040\t]*(?: \(
[^\\\x
80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \( [^\\\x80-\xff\n\015()] *(?:
\\ [
^\x80-\xff] [^\\\x80-\xff\n\015()] *)*\)) [^\\\x80-\xff\n\015()] *)*\)
[\040\t
]* )*(?: \@ [\040\t]*(?: \( [^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff]
| \
( [^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()]
*)*\)) [^
\\\x80-\xff\n\015()] *)*\) [\040\t]* )*
(?'domain'(?:[^(\040)<>\@,;:\".\\\[\]\00
0-\037\x80-\xff]+(?![^(\040)<>\@,;:\".\\\[\]\000-\037\x80-\xff])|\[(?:
[^\\\x80-
\xff\n\015\[\]"] | \\ [^\x80-\xff] )*\])[\040\t]*(?: \(
[^\\\x80-\xff\n\015()]
*(?:(?: \\ [^\x80-\xff] | \( [^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff]
[^
\\\x80-\xff\n\015()] *)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*(:?\.
[\040
\t]*(?: \( [^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\x80-\xff\n
\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] *)*\))
[^\\\x80-\xff\n\015
()] *)*\) [\040\t]* )*
(?:[^(\040)<>\@,;:\".\\\[\]\000-\037\x80-\xff]+(?![^(\040
)<>\@,;:\".\\\[\]\000-\037\x80-\xff])|\[(?: [^\\\x80-\xff\n\015\[\]"] | \\
[^\x
80-\xff] )*\])[\040\t]*(?: \( [^\\\x80-\xff\n\015()] *(?:(?: \\
[^\x80-\xff]
| \( [^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()]
*)*\))
[^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*)*)(?: , [\040\t]*(?: \(
[^\\\x80-\xff
\n\015()] *(?:(?: \\ [^\x80-\xff] | \( [^\\\x80-\xff\n\015()] *(?: \\
[^\x80-\
xff] [^\\\x80-\xff\n\015()] *)*\)) [^\\\x80-\xff\n\015()] *)*\)
[\040\t]* )* \
@ [\040\t]*(?: \( [^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\x80
-\xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] *)*\))
[^\\\x80-\xf
f\n\015()] *)*\) [\040\t]* )*
(?'domain'(?:[^(\040)<>\@,;:\".\\\[\]\000-\037\x80
-\xff]+(?![^(\040)<>\@,;:\".\\\[\]\000-\037\x80-\xff])|\[(?:
[^\\\x80-\xff\n\015
\[\]"] | \\ [^\x80-\xff] )*\])[\040\t]*(?: \( [^\\\x80-\xff\n\015()]
*(?:(?:
\\ [^\x80-\xff] | \( [^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff]
[^\\\x80-\xf
f\n\015()] *)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*(:?\.
[\040\t]*(?: \(
[^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\x80-\xff\n\015()] *(
?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] *)*\)) [^\\\x80-\xff\n\015()]
*)*\)
[\040\t]* )*
(?:[^(\040)<>\@,;:\".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>\@,;:\"
..\\\[\]\000-\037\x80-\xff])|\[(?: [^\\\x80-\xff\n\015\[\]"] | \\
[^\x80-\xff]
)*\])[\040\t]*(?: \( [^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\
x80-\xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] *)*\))
[^\\\x80-
\xff\n\015()] *)*\) [\040\t]* )*)*))*:[\040\t]*(?: \( [^\\\x80-\xff\n\015()]
*(?
:(?: \\ [^\x80-\xff] | \( [^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff]
[^\\\x
80-\xff\n\015()] *)*\)) [^\\\x80-\xff\n\015()] *)*\)
[\040\t]* )* )?(?'localpart
'(?:[^(\040)<>\@,;:\".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>\@,;:\".\\\[\]\000-
\037\x80-\xff])|(?'quotedstr'\"[^\\\x80-\xff\n\015"] *(?: \\ [^\x80-\xff]
[^\\\
x80-\xff\n\015"] * )*\")) [\040\t]*(?: \( [^\\\x80-\xff\n\015()] *(?:(?: \\
[^\
x80-\xff] | \( [^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff]
[^\\\x80-\xff\n\01
5()] *)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*(?:\. [\040\t]*(?: \(
[^\\\
x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \( [^\\\x80-\xff\n\015()] *(?:
\\
[^\x80-\xff] [^\\\x80-\xff\n\015()] *)*\)) [^\\\x80-\xff\n\015()] *)*\)
[\040\
t]* )*
(?:[^(\040)<>\@,;:\".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>\@,;:\".\\\[\
]\000-\037\x80-\xff])|(?'quotedstr'\"[^\\\x80-\xff\n\015"] *(?: \\
[^\x80-\xff]
[^\\\x80-\xff\n\015"] * )*\")) [\040\t]*(?: \( [^\\\x80-\xff\n\015()]
*(?:(?:
\\ [^\x80-\xff] | \( [^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff]
[^\\\x80-\xf
f\n\015()] *)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*)*) \@
[\040\t]*(?: \
( [^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\x80-\xff\n\015()] *
(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] *)*\)) [^\\\x80-\xff\n\015()]
*)*\)
[\040\t]* )*
(?'domain'(?:[^(\040)<>\@,;:\".\\\[\]\000-\037\x80-\xff]+(?![^(\04
0)<>\@,;:\".\\\[\]\000-\037\x80-\xff])|\[(?: [^\\\x80-\xff\n\015\[\]"] | \\
[^\
x80-\xff] )*\])[\040\t]*(?: \( [^\\\x80-\xff\n\015()] *(?:(?: \\
[^\x80-\xff]
| \( [^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()]
*)*\)
) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*(:?\. [\040\t]*(?: \(
[^\\\x80-\xff\n
\015()] *(?:(?: \\ [^\x80-\xff] | \( [^\\\x80-\xff\n\015()] *(?: \\
[^\x80-\xf
f] [^\\\x80-\xff\n\015()] *)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*
(?:
[^(\040)<>\@,;:\".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>\@,;:\".\\\[\]\000-\037
\x80-\xff])|\[(?: [^\\\x80-\xff\n\015\[\]"] | \\
^\x80-\xff] )*\])[\040\t]*(?
: \( [^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\x80-\xff\n\015()
] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] *)*\))
[^\\\x80-\xff\n\015()] *)
*\) [\040\t]* )*)*)>)

Cheers

Arne Janning
Nov 21 '05 #2

P: n/a
I have anothing post somewhere asking a similar question...

1) will this regular expression work for all languages?

2) should I use the full regular expression and why don't people use
the full regular expression?

3) will the full expression handle all cases? Should I be less strict
with my validation.... are there email systems that don't follow this
standard?
Nov 21 '05 #3

P: n/a
"Ryan" <ry***@ungerboeck.com> schrieb:
I have anothing post somewhere asking a similar question...

1) will this regular expression work for all languages?
What do you mean with "languages"? Programming languages or natural
languages? Yes, it will work with all natural languages, and all
programming languages that support the same regular expression syntax with
the same semantics put on the syntax.
2) should I use the full regular expression and why don't
people use the full regular expression?
'cause they never read the RFC.
3) will the full expression handle all cases? Should I be
less strict with my validation.... are there email systems
that don't follow this standard?


This regular expression will handle all cases, and all RFC-compliant mail
systems will follow this standard.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #4

P: n/a
Obviously I need to read the RFP... my language question was in
reference to my question to whether an email in Chinese would work;
sounds like it does.

I asked the second question wondering if people didnt use the full
expression because of the speed of the validation.

Thanks Herfried
Ryan

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message news:<##**************@tk2msftngp13.phx.gbl>...
"Ryan" <ry***@ungerboeck.com> schrieb:
I have anothing post somewhere asking a similar question...

1) will this regular expression work for all languages?


What do you mean with "languages"? Programming languages or natural
languages? Yes, it will work with all natural languages, and all
programming languages that support the same regular expression syntax with
the same semantics put on the syntax.
2) should I use the full regular expression and why don't
people use the full regular expression?


'cause they never read the RFC.
3) will the full expression handle all cases? Should I be
less strict with my validation.... are there email systems
that don't follow this standard?


This regular expression will handle all cases, and all RFC-compliant mail
systems will follow this standard.

Nov 21 '05 #5

P: n/a
I want to validate email addresses in iebms to the standard RFC 822 or
something like that. This regular expression was recommended and will
work… however for some reason it always returns false…

Besides making double quotes two double quotes, I didn't change the
expression. I did that so the string would work.

Any help?

Ryan

Public Function ValidateEmail(ByVal astrEmailAddress As String) As
Boolean

Return System.Text.RegularExpressions.Regex.IsMatch(astrE mailAddress,
("^[\040\t]*(?: \( [^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] |
\( [^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff]
[^\\\x80-\xff\n\015()] *)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]*
)*(?'mailbox'(?'localpart'(?:[^(\040)<>\@,;:\"".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>\@,;:\"".\\\[\]\000-\037\x80-\xff])|(?'quotedstr'\""[^\\\x80-\xff\n\015""]
*(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015""] * )*\"")) [\040\t]*(?: \(
[^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()]
*)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*(?:\. [\040\t]*(?: \(
[^\\\x80-\xff\n\015()] *(?:(?: \\[^\x80-\xff] | \(
[^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()]
*)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*
(?:[^(\040)<>\@,;:\"".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>\@,;:\"".\\\[\]\000-\037\x80-\xff])|(?'quotedstr'\""[^\\\x80-\xff\n\015""]
*(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015""] * )*\"")) [\040\t]*(?: \(
[^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()]
*)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*)*) \@ [\040\t]*(?: \(
[^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()]
*)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*
(?'domain'(?:[^(\040)<>\@,;:\"".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>\@,;:\"".\\\[\]\000-\037\x80-\xff])|\[(?:
[^\\\x80-\xff\n\015\[\]""] | \\ [^\x80-\xff] )*\])[\040\t]*(?: \(
[^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()]
*)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*(:?\. [\040\t]*(?: \(
[^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()]
*)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*
(?:[^(\040)<>\@,;:\"".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>\@,;:\"".\\\[\]\000-\037\x80-\xff])|\[(?:
[^\\\x80-\xff\n\015\[\]""] | \\ [^\x80-\xff] )*\])[\040\t]*(?: \(
[^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()]
*)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]*
)*)*)|(?:[^(\040)<>\@,;:\"".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>\@,;:\"".\\\[\]\000-\037\x80-\xff])|(?'quotedstr'\""[^\\\x80-\xff\n\015""]
*(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015""] *
)*\""))[^()<>\@,;:\"".\\\[\]\x80-\xff\000-\010\012-\037](?:(?: \(
[^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()]
*)*\)) [^\\\x80-\xff\n\015()] *)*\) |
(?'quotedstr'\""[^\\\x80-\xff\n\015""] *(?: \\ [^\x80-\xff]
[^\\\x80-\xff\n\015""] * )*\"")
)[^()<>\@,;:\"".\\\[\]\x80-\xff\000-\010\012-\037] *)* < [\040\t]*(?:
\( [^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()]
*)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*(?: \@ [\040\t]*(?: \(
[^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()]
*)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*
(?'domain'(?:[^(\040)<>\@,;:\"".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>\@,;:\"".\\\[\]\000-\037\x80-\xff])|\[(?:
[^\\\x80-\xff\n\015\[\]""] | \\ [^\x80-\xff] )*\])[\040\t]*(?: \(
[^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()]
*)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*(:?\. [\040\t]*(?: \(
[^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()]
*)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*
(?:[^(\040)<>\@,;:\"".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>\@,;:\"".\\\[\]\000-\037\x80-\xff])|\[(?:
[^\\\x80-\xff\n\015\[\]""] | \\ [^\x80-\xff] )*\])[\040\t]*(?: \(
[^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff]| \(
[^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()]
*)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*)*)(?: , [\040\t]*(?:
\( [^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()]
*)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )* \@ [\040\t]*(?: \(
[^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()]
*)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*
(?'domain'(?:[^(\040)<>\@,;:\"".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>\@,;:\"".\\\[\]\000-\037\x80-\xff])|\[(?:
[^\\\x80-\xff\n\015\[\]""] | \\ [^\x80-\xff] )*\])[\040\t]*(?: \(
[^\\\x80-\xff\n\015()] *(?:(?:\\ [^\x80-\xff] | \(
[^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()]
*)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*(:?\. [\040\t]*(?: \(
[^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()]
*)*\)) [^\\\x80-\xff\n\015()] *)*\)[\040\t]* )*
(?:[^(\040)<>\@,;:\"".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>\@,;:\"".\\\[\]\000-\037\x80-\xff])|\[(?:
[^\\\x80-\xff\n\015\[\]""] | \\ [^\x80-\xff])*\])[\040\t]*(?: \(
[^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()]
*)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*)*))*:[\040\t]*(?: \(
[^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()]
*)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*
)?(?'localpart'(?:[^(\040)<>\@,;:\"".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>\@,;:\"".\\\[\]\000-\037\x80-\xff])|(?'quotedstr'\""[^\\\x80-\xff\n\015""]
*(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015""] * )*\"")) [\040\t]*(?: \(
[^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()]
*)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*(?:\. [\040\t]*(?: \(
[^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\x80-\xff\n\015()] *(?: \\[^\x80-\xff] [^\\\x80-\xff\n\015()]
*)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*
(?:[^(\040)<>\@,;:\"".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>\@,;:\"".\\\[\]\000-\037\x80-\xff])|(?'quotedstr'\""[^\\\x80-\xff\n\015""]
*(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015""] * )*\"")) [\040\t]*(?: \(
[^\\\x80-\xff\n\015()] *(?:(?:\\ [^\x80-\xff] | \(
[^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()]
*)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*)*) \@ [\040\t]*(?: \(
[^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()]
*)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*
(?'domain'(?:[^(\040)<>\@,;:\"".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>\@,;:\"".\\\[\]\000-\037\x80-\xff])|\[(?:
[^\\\x80-\xff\n\015\[\]""] | \\ [^\x80-\xff] )*\])[\040\t]*(?: \(
[^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()]
*)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*(:?\. [\040\t]*(?: \(
[^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()]
*)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*
(?:[^(\040)<>\@,;:\"".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>\@,;:\"".\\\[\]\000-\037\x80-\xff])|\[(?:
[^\\\x80-\xff\n\015\[\]""] | \\ [^\x80-\xff] )*\])[\040\t]*(?: \(
[^\\\x80-\xff\n\015()] *(?:(?: \\ [^\x80-\xff] | \(
[^\\\x80-\xff\n\015()] *(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()]
*)*\)) [^\\\x80-\xff\n\015()] *)*\) [\040\t]* )*)*)>)$"))

End Function
Nov 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.