News for hackers. Stuff that matters.
Re:Regular Expressions – Mastering Lookahead and Lookbehind by zaarn on Friday March 16, 2018 @05:42AM (#16599559)
Regex's are awesome as a swiss army knife.

Though in my experience, outside some edge cases where the format never changes (like matching a domain name in a URL) a regex is hell to maintain when you come back 3 years later.

There is also always the fun of people trying (and failing) to use regex in emails.

Re:Regular Expressions – Mastering Lookahead and Lookbehind by ulucs on Friday March 16, 2018 @11:50AM (#16601447)
.+@.+ seems to be the only one without too many false-negatives
Re:Regular Expressions – Mastering Lookahead and Lookbehind by zaarn on Monday March 19, 2018 @03:32AM (#16616660)
Well the best solution is to check if .+@(.+) matches and then try to lookup what the capture group returned via your DNS resolver. If it has an MX record (or CNAME to something with MX), then deliver the mail to there.

If you can't resole the domain part, return an error.