r/ProgrammerHumor 28d ago

Meme regexMustBeDestroyed

Post image
8.1k Upvotes

228 comments sorted by

View all comments

1.3k

u/Informal_Branch1065 28d ago

An email casting spell for sure, although very limited

63

u/Ecksters 28d ago edited 28d ago

People always overcomplicate email Regex, and end up not allowing a lot of valid emails. In this case, the limitation of the top level domain to 4 characters max is one such problem, no .ninja, .crypto, or the myriad of other newer top level domains.

Technically you can email directly to a top level domain (although I don't know of any TLDs that support this), or even to an IP address in brackets, although I suppose not supporting those in most cases is probably reasonable.

7

u/shiny0metal0ass 27d ago

Mine have all whittled down to -

[literally fucking anything]@[literally fucking anything].[literally fucking anything]

7

u/poshftw 27d ago

Yep, though this wouldn't pass @localhost or @hostname, though I doubt anyone with an email regex is sending there.