Editing 208: Regular Expressions

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 10: Line 10:
 
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 {{w|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. {{w|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. The "PERL!" in the fifth panel is reminiscent of old superhero serials, particularly {{w|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 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 {{w|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. {{w|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. The "PERL!" in the fifth panel is reminiscent of old superhero serials, particularly {{w|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.
+
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) because the syntax of some commands and programming languages are just too difficult to remember by heart.
  
 
==Transcript==
 
==Transcript==

Please note that all contributions to explain xkcd may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see explain xkcd:Copyrights for details). Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel | Editing help (opens in new window)