513
Expressions (lemmy.nz)
submitted 1 month ago by cannedtuna@lemmy.world to c/memes@lemmy.world
you are viewing a single comment's thread
view the rest of the comments
[-] Ephera@lemmy.ml 12 points 1 month ago

Perhaps worth adding that verifying an e-mail address via regex is difficult and not actually that useful.

Difficult, because a lot of e-mail addresses are syntactically valid. For example, a@b is valid. As is a@1.2.3.4. As is "spaces are cool ๐Ÿ˜Ž"@b (with the quotes).

And it's not that useful, because you need to send out an e-mail either way, if you want to know that it's the correct address and the user has access to it. A regex can't catch a typo in the actual words, for example.

If you want a basic sanity check to catch when the user types their name into the e-mail field, then you can require that it contains an @ and, if you want, that there's at least one symbol before and after.
If you go beyond that, you either need a massive regex or you're going to lock out users with unusual e-mail addresses.

[-] naticus@lemmy.world 5 points 1 month ago

Yep, these email address validation tools are the bane of my existence. I use a non-typical TLD and it sometimes gets flagged as invalid because it's not .com, .net, or .org.

[-] funkless_eck@sh.itjust.works 3 points 1 month ago

I've found many systems don't work with the .company TLD!

[-] kionay@lemmy.world 4 points 1 month ago

or some u.s.-centric ones that break with .co.uk

[-] virku@lemmy.world 2 points 1 month ago

I wrote one parser that checked the top level domain against a txt of all top level domains downloaded from Icann once a day. Was kind of proud of that one.

[-] naticus@lemmy.world 2 points 1 month ago

That's a pretty clever way of doing it!

this post was submitted on 27 Sep 2026
513 points (98.1% liked)

memes

23157 readers
2594 users here now

Community rules

1. Be civilNo trolling, bigotry or other insulting / annoying behaviour

2. No politicsThis is non-politics community. For political memes please go to !politicalmemes@lemmy.world

3. No recent repostsCheck for reposts when posting a meme, you can only repost after 1 month

4. No botsNo bots without the express approval of the mods or the admins

5. No Spam/Ads/AI SlopNo advertisements or spam. This is an instance rule and the only way to live. We also consider AI slop to be spam in this community and is subject to removal.

A collection of some classic Lemmy memes for your enjoyment

Sister communities

founded 3 years ago
MODERATORS