You're viewing a comment by you and its responses.
You're viewing a comment by you and its responses.
I am being sponsored by Syntress! They bought me an amazing dedicated server to run catonmat on. If you're looking web services, I highly recommend the Syntress guys!
I am being sponsored by A-Writer! If you ever need help with essay writing, look no further than A-Writer! They will help you with your writing in as quickly as 3 hours!
I love to read science books. They make my day and I get ideas for awesome blog posts, such as Busy Beaver, On Functors, Recursive Regular Expressions and many others.
Take a look at my
Amazon wish list, if you're curious about what I have planned reading next, and want to surprise me. :)
If you are interested in advertising on catonmat.net, contact me.
Free tools for coding on Vietstarsoft.com.
Programming homework help.


#112 is VERY bad. If you ever have to validate an email address, you might want to speed a few minutes and find a regex that does it right. It is a complex problem that does deserve some time. Do NOT roll your own solution just because you [think you] can.
In this case, enforcing the dot in the domain part is a bad idea not only because it violates the standard (that would be RFC 822) because there are legitimate use cases. for example:
* special domains (like "localhost" for example (there *are* others). Administrative mail on linux gets delivered to root@localhost by default.)
* gtlds
* intranet-only applications where clients have a dns search domain
I know of one company that has two dozen (no kidding) different functions their flagship product that are supposed to validate email addresses. Most of them are non-trivial and definitely took some time to implement. Not one of them is correct.
Reply To This Comment