this post was submitted on 14 Feb 2025
888 points (98.5% liked)

Programmer Humor

20689 readers
839 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 4 points 6 days ago

Where did you get that "RFC standard" regex? It doesn't allow domain names with one component RFC5321

Neither does it allow spaces in quoted string, as per RFC5322

This, ๐Ÿ‘‹@โœ‰๏ธ.gg, is already a working email address in most clients and if RFC6532 ever gets accepted, it would be officially recognized as such.

My point isn't to make your regex bad, just that it doesn't validate or invalidate an email properly. Nothing stops me from giving you and invalid but syntactically correct email after all.
You have to send an email anyways to verify, so the most you can check is the presence of one @ symbol.