Re:You Should Learn Regex
by mhd on Wednesday October 11, 2017 @08:36AM
(#15449217)
Depends on the use case. For forms, a preliminary sanity check doesn't hurt, e.g. when the user enters their username and password, instead of email & password (accepting either would be best, but you can't always do that).
[ Parent
| on HN ]
Mailcheck is great for this. People constantly make typos when entering emails. This utility suggests [email protected] if they type in [email protected]. But, it's their choice...it just suggests corrections.
My logs show that it helps a lot. Bounced emails from orders dropped by more than half.
https://github.com/mailcheck/mailcheck/blob/master/README.md