this post was submitted on 14 Feb 2025
909 points (100.0% liked)

Programmer Humor

22134 readers
2100 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] 17 points 1 month ago (3 children)

I was about to ruin your day by finding a valid email address that would be rejected by your regex, but it doesn't even parse correctly on regex101.com

The only valid regex for email is .+@.+ btw

[–] [email protected] 5 points 1 month ago (1 children)

What about "user@not_domain"? It validates but isn't valid - there's no domain part, the @ is quoted

[–] [email protected] 4 points 1 month ago

That's not something you can determine using a regex.

"user@com" for example could be a perfectly working email.

The right way is to send a verification email in every case.

[–] [email protected] 2 points 1 month ago (1 children)

Does this regex include

"very.(),:;<>[]\".VERY.\"very@\\ \"very\".unusual"@strange.example.com