315
submitted 8 months ago by mac@programming.dev to c/comics@programming.dev

Hover Text:

Wait, forgot to escape a space. Wheeeeee[taptaptap]eeeeee!

Transcript

[in a yellow box:]
Whenever I learn a new skill I concoct elaborate fantasy scenarios where it lets me save the day.

Megan: Oh no! The killer must have followed her on vacation!
[Megan points to computer.]
Megan: But to find them we'd have to search through 200 MB of emails looking for something formatted like an address!
Cueball: It's hopeless!

Off-panel voice: Everybody stand back.

Off-panel voice: I know regular expressions.

[A man swings in on a rope, toward the computer.]

tap tap
The word PERL! appears in a bubble.

[The man swings away, and the other characters cheer.]

you are viewing a single comment's thread
view the rest of the comments
[-] elvith@feddit.de 1 points 8 months ago* (last edited 8 months ago)

You're completely correct. In practice, it's usually good enough to just check for ".+@.+" or ".+@.+\..+". Why? It's broad enough to allow almost everything and it rejects the most obvious typos. And in the end, the final verification would be to send an email there which contains a link, that one has to click to finalize the signup/change. Even if you had a regex that could filter every possible adress that's possible according to the standard, you still wouldn't know whether it really exists.

this post was submitted on 01 Feb 2024
315 points (98.5% liked)

Comics

436 readers
1 users here now

A community for sharing comics related to programming

Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 8 months ago
MODERATORS