That was an awesome read. I’ve had discussions/arguments about this topic several times while on the clock. This post does a great job summing up. My number one example is a@a which on some of my previous intranets on-the-job actually worked.
Email addresses are incredibly complex to parse, and on top of that every server and service adds its own rules. It’s like a standard that nobody truly respects (probably because it’s too complex). I don’t know if there exists a single regexp that can validate any valid address, but if it exists it’s probably super complex too. This is unfortunate because regexps are very useful tools and I guess they are used everywhere to validate addresses. I’m guilty myself of using regexps that only validate a subset of all the possible addresses (the normal user@domain). I feel like… if I truly wanted to validate an address properly, I’d have to refresh my flex/bison :-)