It blows my mind that there is no simple regex to validate email.

There are websites for the sole purpose of offering a solution, like and threads upon threads on StackOverflow and forums of debates around the topic and still each website will randomly refuse valid emails or accept non valid ones.



Email regular expressions are the fastest way I've found to help new developers off the Dunning-Krueger hill when they start learning regexs. Seeing the number of cases you have to watch for expand, seemingly endlessly, helps people understand what they don't yet know.

The weird thing to me now isn't that email regexs don't work, it's that, somehow, email DOES work. Mostly. Kinda. Like all older computer systems, email protocols seem to be held together by duct tape and good intentions.

@nate True, if we attempted to explain how the DNS or Email protocol works to an extraterrestrial or one of our ancestrales they wouldn't believe this would ever work :)

Sign in to participate in the conversation
Frogmob Life

A tiny, intentional community of writers and people who really like frogs.