3 ms·
I was going to post a comment about the regex used to (coarsely) validate email addresses made no sense, but when I opened the article in a new tab to copy for
by unwind 4y ago
I was going to post a comment about the regex used to (coarsely) validate email addresses made no sense, but when I opened the article in a new tab to copy for quoting, it had changed. :)
It's now
"^[^@\\s]+@\\S+$"
with a comment also stating that it could be better. That's at least sensible, the original one that I first saw was more or less "^[^@]@.*" which kind of makes no sense. Oh well, great that the author caught it, of course.
- bqmjjx0kac 4y agoI'm still not convinced that it's correct. Probably worth perusing RFC 3696. https://www.rfc-editor.org/rfc/rfc3696.html https://www.rfc-editor.org/rfc/rfc3696.html