Strictly speaking that regex cannot determine that an email address is well-formed per the RFC as the grammar defining the form of email addresses is a Type 2 Chomsky Grammar and regular expressions are limited to Type 3 Chomsky Grammars.
Off topic weirdness: I did a quick Google to make sure I remembered this correctly, and the snippet on the second result confirmed what I was going to say, so I said it. Then I actually followed the link, and it turned out it was me saying it in a comment to an answer on Stack Overflow a couple of years ago: <http://stackoverflow.com/a/1874122/16782>. So if I was wrong then, I'm wrong now ;-) Cheers, Nick. Sent from my iPad On 19 Dec 2011, at 19:38, Andre Terra <andrete...@gmail.com> wrote: > Useful/interesting read: "I knew how to validate an e-mail address until I > read the RFC" [1]. > > And a full regex for validating e-mails per the RFC is available here[2], not > that you'd want to use it. > > > [1] > http://haacked.com/archive/2007/08/21/i-knew-how-to-validate-an-email-address-until-i.aspx > [2] http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html > > > Cheers, > AT > > On Mon, Dec 19, 2011 at 3:51 PM, Ian Kelly <ian.g.ke...@gmail.com> wrote: > On Mon, Dec 19, 2011 at 9:36 AM, Maxim Badika <mibad...@gmail.com> wrote: > > Hello all! > > > > i found that > > > > email_re.search(u'my...@mydomain.com.') # with dot at the end of > > address > > > > returns true. I think that is incorrect. > > Thanks. > > That is actually correct, and it is equivalent to "my...@domain.com". > See RFC 3696. > > The root of the domain name tree is known as "." and the TLDs are > technically "com.", "edu.", "uk.", etc. When discussing domains below > the TLDs, the trailing dot is normally omitted ("domain.com"), but > applications are still required to accept it > > Cheers, > Ian. > > -- > You received this message because you are subscribed to the Google Groups > "Django developers" group. > To post to this group, send email to django-developers@googlegroups.com. > To unsubscribe from this group, send email to > django-developers+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-developers?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups > "Django developers" group. > To post to this group, send email to django-developers@googlegroups.com. > To unsubscribe from this group, send email to > django-developers+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-developers?hl=en. -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.