News for hackers. Stuff that matters.
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).
Re:You Should Learn Regex by tyingq on Wednesday October 11, 2017 @08:52AM (#15449322)
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