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.]

0 points

I learned regex in a data entry job when receiving spreadsheets of user info they entered themselves. The number of times I went from a 40-minute by-hand solution to a 30-second one was astounding.

Need to clean up capitalization? Regex.

Need to fix all the phone numbers with dashes in them? Regex.

Need to make sure all the emails are valid? Regex.

So many hours of tedium saved. It really is one of the most powerful tools to have in your back pocket.

permalink
report
reply
0 points

Need to make sure all the emails are valid? Regex.

Hmm…

permalink
report
parent
reply
0 points

Oh no

permalink
report
parent
reply
0 points

Who’s gonna tell them? I’d do it but I’m still busy parsing HTML with regex… it’s working any minute now!

permalink
report
parent
reply
0 points
*

I’ve never bothered to learn regex because I can do this sort of stuff easily in Python. For any non-trivial job it’s better to have things like error handling, statistics, logs and *gasp* readability.

permalink
report
reply
0 points

Are you not using regex in Python to do that?

permalink
report
parent
reply
0 points

No. Never saw the need.

permalink
report
parent
reply
0 points

Regex is fast and useful though. It’s a tool in your toolbox that make certain situations extremely easy as the comic depicts.

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