I hadn't read it the RFC, just glanced through it. I'd seen Ooble's link in the other thread and gotten a kick out of it. I was just trying to match the domain language (the one above) and the language for the local segment:
Quote:
|
Originally Posted by RFC 2822
atext = ALPHA / DIGIT / ; Any character except controls,
"!" / "#" / ; SP, and specials.
"$" / "%" / ; Used for atoms
"&" / "'" /
"*" / "+" /
"-" / "/" /
"=" / "?" /
"^" / "_" /
"`" / "{" /
"|" / "}" /
"~"
atom = [CFWS] 1*atext [CFWS]
dot-atom = [CFWS] dot-atom-text [CFWS]
dot-atom-text = 1*atext *("." 1*atext)
|
which I had simplified to [atext]([atext]|.)*[atext]. I wasn't going for perfection, just a more in depth accuracy than most people do (i.e. ".+@.+\..+). I wasn't even checking the local-part length for being under 64 or the domain length for being under 255. Though I could do those separately with strlen().
And just looking at it after a nice night's sleep, I think it should be ([atext]*.)*[atext]* so I'll probably work things out again... maybe on paper this time... :o