Regular Expressions
Regular Expressions
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.]
A similar T-shirt in the xkcd store based on this comic says "stand back...I'm going to try science."

The comic begins with Randall saying how every time he develops a new skill, he finds himself daydreaming about using it to save the day. Computer skills aren't usually superhero material, which lends itself to the humor of the comic.
In computing, a regular expression ("regex") provides a concise and flexible means to "match" (specify and recognize) strings of text, such as particular characters, words, or patterns of characters.
Manually trying to look for a specific pattern through 200 MB of text is equivalent to looking for a needle in a haystack. But this task can be made easy by using regexes, since a script can read through text and match specific string patterns much faster than humans can achieve.
Perl is a popular scripting language that has often been referenced favorably in the comic. Perl is also the most acknowledged language when it comes to the performance while evaluating regular expressions. [ citation needed ]
The "PERL!" in the fifth panel is reminiscent of old superhero serials, particularly Batman (TV series) , in which sound effects such as "BAM!" "POW!" "ZAP!" would be displayed on screen in similar spiky bubbles. This fits with the theme of the comic, with Cueball being a "superhero" who fights crime using computer skills.
The title text refers to how sensitive regexes can be to small mistakes or missing characters. In 1168: tar , another potential hero fails (and gets blown up by a nuclear bomb that is only able to be disarmed by typing in a valid tar command, but blows up if you don't do it on the first try) because the syntax of some commands and programming languages are just too difficult to remember by heart.
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.]
A similar T-shirt in the xkcd store based on this comic says "stand back...I'm going to try science."
