6 ms·
I use a slightly more complex variation of that: ^.+@.+\..+$ Works wonders. I think when testing the addresses on a sign up form, we got only 0.5% that we
by allegory 12y ago
I use a slightly more complex variation of that:
^.+@.+\..+$
Works wonders. I think when testing the addresses on a sign up form, we got only 0.5% that we couldn't relay too which was a pretty good hit rate.
- paulnechifor 12y agoIt looks to me like you're neglecting email addresses from <http://ai./> http://ai./>. The 'ai' TLD does have an MX record.
- allegory 12y agoYes; I get told that every time I mention it :-)
- tragomaskhalos 12y agoI would suspect that anyone whose email did not match that regex would have such a miserable time generally getting it rejected as invalid left right and centre that they would just cave in and get a simpler one that did.
- TezzellEnt 12y agoThat's pretty good. I learned from Rails Tutorial to use this one: /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i It's worked for me when I needed to use it.