Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
addandsubtract
2y ago
0 comments
Save
Share
This is where the linked regex fails at.
0 comments
3 comments · 1 top-level
top
newest
oldest
ceejayoz
2y ago
· 2 in thread
Or correctly handles, for most of the use cases you’d want it for.
If you’re building a web app, foo@gmailcom is almost certainly a mistake.
bazoom42
2y ago
Of course, since there isn’t a top level domain called gmailcom. But a regex cant tell you that.
ceejayoz
2y ago
Gmail doesn't
need to support
"you own an entire TLD and use its root for email" use cases, so you can
at least
check for a dot after the @ and catch a bunch of typos that leave frustrated users.
j
/
k
navigate · click thread line to collapse