[REBOL] Re: Rules for valid email addresses
From: greggirwin::mindspring::com at: 20-Oct-2001 12:03
<< Anyone know what characters and character combinations are invalid in
email addresses? >>
RFC822 talks about addresses and Jeff Friedl talks about them at length in
his book 'Mastering Regular Expressions'. They *can* be pretty darn hairy,
as the spec shows:
address = mailbox ; one addressee
/ group ; named list
group = phrase ":" [#mailbox] ";"
mailbox = addr-spec ; simple address
/ phrase route-addr ; name & addr-spec
route-addr = "<" [route] addr-spec ">"
route = 1#("@" domain) ":" ; path-relative
addr-spec = local-part "@" domain ; global address
local-part = word *("." word) ; uninterpreted
domain = sub-domain *("." sub-domain)
sub-domain = domain-ref / domain-literal
domain-ref = atom ; symbolic reference
Mr. Friedl built a regex that does it (everything but nested comments he
says in the book) which is almost 5K in length. Can you imagine!?
<< Has anyone build a function to check for email address validation? >>
Not that I know of, though REBOL's parscentricity would make it a good