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 thread.
View all comments View context
0 points

Ah, yeah. It was never meant to be a be all and all. Just something to clean up the complete trash before I started proofreading. Besides, these were emails the customer provided and could easily be changed afterwords. Their fault if we get bad emails in the list ¯\_(ツ)_/¯

permalink
report
parent
reply
0 points
*

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.

permalink
report
parent
reply

Comics

!comics@programming.dev

Create post

A community for sharing comics related to programming

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

Community stats

  • 1

    Monthly active users

  • 61

    Posts

  • 33

    Comments

Community moderators