Steven,
If you are familiar with RFC's, why not just look it up?
my typically
answer to this would be to look up the RFC..teach a man how to fish
afterall..
Anyways, I'd still try to help since RFCs are a pain in the rear and I
just spent 10 minutes trying to follow it because I wanted to know as
well.
RFC 2822..
addr-spec = local-part "@" domain
so we are interested in local-part
local-part = dot-atom / quoted-string / obs-local-part
we'll look at dot-atom since that's the most common and we don't want to
quote our email adrress
dot-atom = [CFWS] dot-atom-text [CFWS]
ignore the CFWS (folding whitespace w/comments), so we want the
dot-atom-text
dot-atom-text = 1*atext *("." 1*atext)
so we want atext
atext = ALPHA / DIGIT / ; Any character except controls,
"!" / "#" / ; SP, and specials.
"$" / "%" / ; Used for atoms
"&" / "'" /
"*" / "+" /
"-" / "/" /
"=" / "?" /
"^" / "_" /
"`" / "{" /
"|" / "}" /
"~"
note that dash isn't in the list, but maybe it's under ALPHA
item-name = ALPHA *(["-"] (ALPHA / DIGIT))
BINGO! We have a dash, but if you have a dash, it must clearly be
followed by another ALPHA or Digit
I could have followed that wrong (and there certainly are other paths) but
I think it's right.
hope that hels
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
Steven Berkovitz said:
I was just wondering if there is a reason (maybe a RFC requirement?) that
the
built in email address regular expression for the
RegularExpressionValidator
in ASP.NET doesn't support email aliases ending in a dash.
For example, the following address will not validate:
(e-mail address removed)
Thanks,
-Steven