jesh Posted November 29, 2006 Share Posted November 29, 2006 Does anyone know what organizing body manages the standards for the format of an email address? I checked the W3C but wasn't able to find the information there. Is there even such a body or is it ruled by anarchy? :)I'm not having any luck with Google because just about every website on the Internet has "email address" on it somewhere.EDIT: To clarify, I want to be able to validate an email address using regular expressions. I don't need to know how to write the regular expression - I can do that on my own. What I'm looking for is a definition of what, exactly, constitutes a valid email address. For example, is jesh_@somedomain.com a valid email address or not? What about jesh___________________@somedomain.com? Is there a standard out there? Link to comment Share on other sites More sharing options...
aspnetguy Posted November 29, 2006 Share Posted November 29, 2006 you mean whether it should befirst.last@yourdomain.comflast@yourdomain.comIs that what you mean? Link to comment Share on other sites More sharing options...
jesh Posted November 29, 2006 Author Share Posted November 29, 2006 I think I was adding my edit while you were replying. I want to know if there is a standard regarding the format of the local-part (i.e. "jesh" in jesh@somedomain.com). Link to comment Share on other sites More sharing options...
pulpfiction Posted November 29, 2006 Share Posted November 29, 2006 Is this something you are looking for....http://tools.ietf.org/html/rfc2822#section-3.4.1check this out too...http://en.wikipedia.org/wiki/E-mail_address Link to comment Share on other sites More sharing options...
jesh Posted November 29, 2006 Author Share Posted November 29, 2006 Hmm, I managed to find a few links:http://www.cs.tut.fi/~jkorpela/rfc/822addr.htmlhttp://www.freesoft.org/CIE/RFC/822/index.htmhttp://www.faqs.org/rfcs/rfc2822.htmlBasically, what I am beginning to understand is, there isn't a standard. The local-part of an addr-spec in a mailbox specification (i.e., the host's name for the mailbox) is understood to be whatever the receiving mail protocol server allows.AndA host that is forwarding the message but is not the destination host implied by the right-hand side "domain" must not interpret or modify the "local-part" of the address.So, this means that "jesh$7____23^! bring it!"@somedomain.com is a valid email address if somedomain.com accepts it as such?Is this something you are looking for....http://tools.ietf.org/html/rfc2822#section-3.4.1check this out too...http://en.wikipedia.org/wiki/E-mail_address Thanks! I'll continue reading. Link to comment Share on other sites More sharing options...
justsomeguy Posted November 29, 2006 Share Posted November 29, 2006 There isn't a standard per se, these types of things are governed by RFCs. I see there's already a link for RFC 2822, which does define email addresses. They aren't standards so much as definitions. They are defined using a grammar, like this:addr-spec = local-part "@" domainAn addr-spec is defined as a "local-part", then "@", then "domain". A "local-part" is defined this way:dot-atom / quoted-string / obs-local-partA dot-atom is defined as dot-atom-text, which is defined like this:1*atext *("." 1*atext)So it is 1 or more atext, followed by 0 or more of the group [dot, 1 or more atext]. atext is any of these: atext = ALPHA / DIGIT /; Any character except controls, "!" / "#" / ; SP, and specials. "$" / "%" / ; Used for atoms "&" / "'" / "*" / "+" / "-" / "/" / "=" / "?" / "^" / "_" / "`" / "{" / "|" / "}" / "~" A local part can also be a quoted-string, which is loosely defined as double quotes enclosing an alphanumeric string, minus a few special characters. The domain part can be a dot-atom or a domain-literal. Basically, what all this means is that an address is any number of dot-atoms with a @ in there somewhere. So these are all legal:a@a.aa.a@a.aa@a.a.a.a.a.a.a.a.aaaa.aaa.aaa.aaa.aaa.aaa@a.aMultiple dots in a row are not allowed, since a dot atom is defined as a dot followed by one or more atext characters. And a dot cannot appear at the end, since a dot atom has to be a dot followed by atext.So, in terms of a regexp, you can think of it as something like this (using the same grammar as above):atext (0 or more ["." atext]) "@" atext (0 or more ["." atext]) Link to comment Share on other sites More sharing options...
jesh Posted November 29, 2006 Author Share Posted November 29, 2006 Basically, what all this means is that an address is any number of dot-atoms with a @ in there somewhere. So these are all legal:a@a.aa.a@a.aa@a.a.a.a.a.a.a.a.aaaa.aaa.aaa.aaa.aaa.aaa@a.aSo, too, would be ____________________________________@a.a.Thanks everyone for your help. I was just having the hardest time figuring out how to word my search.@pulpfiction - I had even tried wikipedia, I guess I just didn't think of searching for something as freakishly simple as "Email Address". All the links helped, but I think this one helped the most: http://en.wikipedia.org/wiki/E-mail_address Link to comment Share on other sites More sharing options...
pulpfiction Posted November 29, 2006 Share Posted November 29, 2006 @pulpfiction - I had even tried wikipedia, I guess I just didn't think of searching for something as freakishly simple as "Email Address". All the links helped, but I think this one helped the most: http://en.wikipedia.org/wiki/E-mail_address Yeah sometimes it happens, glad could help you... Link to comment Share on other sites More sharing options...
reportingsjr Posted November 29, 2006 Share Posted November 29, 2006 So, too, would be ____________________________________@a.a.No, the "atom dot" or whatever it is called has to be followed by a letter or whatever Steve said.Offtopic: Pulpfiction, I have been wondering if you based your name off of the movie by Quentin Tarintino? Good movie Link to comment Share on other sites More sharing options...
justsomeguy Posted November 29, 2006 Share Posted November 29, 2006 No, the "atom dot" or whatever it is called has to be followed by a letter or whatever Steve said.I think the dot at the end is for the end-of-sentence, not necessarily part of the pattern. But that's correct, the address cannot end in a dot. Link to comment Share on other sites More sharing options...
jesh Posted November 29, 2006 Author Share Posted November 29, 2006 No, the "atom dot" or whatever it is called has to be followed by a letter or whatever Steve said.Not according to this:According to RFC 2822, the local-part of the e-mail may use any of these ASCII characters: * Uppercase and lowercase letters (case insensitive) * The digits 0 through 9 * The characters ! # $ % & ' * + - / = ? ^ _ ` { | } ~ * The character "." provided that it is not the first or last character in the local-part.The atom can be made up of any of the above-mentioned characters except for the period (.). So this too should be a valid email address:$$$@somedomain.comOr even (eek):`'`@somedomain.com Link to comment Share on other sites More sharing options...
justsomeguy Posted November 29, 2006 Share Posted November 29, 2006 That's right, but the dot-atom is defined to be a dot followed by any number of "atext" (which is what you have listed up there, other then the dot). So all of these are a "dot-atom":.asdf.a.1.!#$%^&*()But you can't have a dot without an atext following it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now