<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://www.explainxkcd.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jgro</id>
		<title>explain xkcd - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://www.explainxkcd.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jgro"/>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php/Special:Contributions/Jgro"/>
		<updated>2026-05-01T04:27:36Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=1638:_Backslashes&amp;diff=139213</id>
		<title>1638: Backslashes</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=1638:_Backslashes&amp;diff=139213"/>
				<updated>2017-04-25T02:39:46Z</updated>
		
		<summary type="html">&lt;p&gt;Jgro: Note the change in title text after publication&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{comic&lt;br /&gt;
| number    = 1638&lt;br /&gt;
| date      = February 3, 2016&lt;br /&gt;
| title     = Backslashes&lt;br /&gt;
| image     = backslashes.png&lt;br /&gt;
| titletext = I searched my .bash_history for the line with the highest ratio of special characters to regular alphanumeric characters, and the winner was: cat out.txt &amp;amp;#124; grep -o &amp;quot;\\\[[(].*\\\[\])][^)\]]*$&amp;quot; ... I have no memory of this and no idea what I was trying to do, but I sure hope it worked.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Explanation==&lt;br /&gt;
Most programming languages use the concept of a {{w|String literal|string}} literal, which is just a text between some delimiters, usually quotes. For example, &amp;quot;Hello, world&amp;quot; is a string literal. The text being represented is ''Hello, world'' without the quotes. However, the quotes are also written to mark the beginning and end of the string. This is a problem when the text itself contains a quote, as in &amp;quot;This is a &amp;quot;quoted&amp;quot; string&amp;quot;. The quotes around the word &amp;quot;quoted&amp;quot; are intended to be part of the text, but the {{w|Lexical analysis|language processor}} will likely confuse it for the end of the string, which would thus be two strings with ''quoted'' outside these strings (probably resulting in a syntax error).&lt;br /&gt;
&lt;br /&gt;
To avoid this problem, an {{w|Escape character|escape character}} (usually a backslash) is prepended to non-string-terminating quotes. So, the previous text would be written as &amp;quot;This is a \&amp;quot;quoted\&amp;quot; string&amp;quot;. The language processor will substitute every occurrence of \&amp;quot; with only the quote character, and the string terminates at the quote character which does not immediately follow a backslash. In this case the resulting text string would be ''This is a &amp;quot;quoted&amp;quot; string'' as intended.&lt;br /&gt;
&lt;br /&gt;
However, the problem now is that the intended text might contain a backslash itself. For example, the text &amp;quot;C:\&amp;quot; will now be interpreted as an unterminated string containing a quote character. To avoid this, literal backslashes also are escaped with a second backslash, i.e. instead of &amp;quot;C:\&amp;quot; we write &amp;quot;C:\\&amp;quot;, where the language processor interprets \\ as one single backslash and the quote terminates the string to give ''C:\'' as the output.&lt;br /&gt;
&lt;br /&gt;
This doubling of backslashes happens in most programming and scripting languages, but also in other syntactic constructs such as {{w|Regular expression|regular expressions}}. So, when several of these languages are used in conjunction, backslashes pile up exponentially (each layer has to double the number of slashes). See example of a backslash explosion and alternatives to avoid this [[#Backslash explosion and alternatives|below]].&lt;br /&gt;
&lt;br /&gt;
This kind of backslash explosion is known as {{w|Leaning toothpick syndrome}}, and can happen in [[1313: Regex Golf|many situations]]. Below is an explanation of all the [[#Entries in the list|entries in the comic]].&lt;br /&gt;
&lt;br /&gt;
The backslash explosion in the '''title text''' is about a {{w|Bash (Unix shell)|bash}} command (which uses the backslash to escape arguments) invoking the {{w|grep}} utility which searches for text following a pattern specified by means of a regular expression (which also uses the backslash to escape special characters). This leads to 3 backslashes in a row in the command, which could easily become 7 backslashes in a row if the text being searched for also contains a backslash.&lt;br /&gt;
&lt;br /&gt;
Even advanced users who completely understand the concept often have a hard time figuring out exactly how many backslashes are required in a given situation. It is hopelessly frustrating to carefully calculate exactly the number of backslashes and then noticing that there's a mistake so the whole thing doesn't work. At a point, it becomes easier to just keep throwing backslashes in until things work than trying to reason what the correct number is.&lt;br /&gt;
&lt;br /&gt;
It's unclear whether the regular expression in the title text is valid or not. A long discussion about the validity of the expression has occurred here on this explanation's [[Talk:1638: Backslashes|talk page]]. The fact that many editors of the site, often themselves extremely technically qualified{{Citation needed}}, can't determine whether the expression is valid or not, adds a meta layer to the joke of the comic. This is an example of [[356: Nerd Sniping|nerd sniping]] (oh, the irony\!\!\!\).&lt;br /&gt;
&lt;br /&gt;
===Entries in the list===&lt;br /&gt;
*The first four examples have names that are (somewhat) based on what they actually produce:&lt;br /&gt;
**'''Backslash''': 1 backslash appropriately named&lt;br /&gt;
**'''Real backslash''': 2 backslashes are labeled correctly as they do indeed refer to an escaped backslash.&lt;br /&gt;
**'''''Real'' real backslash''': 3 backslashes would refer to an escaped backslash followed by an unescaped one. The first two backslashes would combine to make a ''real backslash'' while the third one would combine with the character following it to form an {{w|Escape sequence|escape sequence}}. The name does thus not make a lot of sense, as this is two escape sequences and not a single &amp;quot;very real&amp;quot; one.&lt;br /&gt;
**'''Actual backslash, for real this time''': 4 backslashes form one single backslash escaped twice (the first escaping produces two backslashes, the second escaping doubles each of the backslashes). This is so common that even the documentation for the {{w|Python (programming language)|Python}} regular expression library has a section called [https://docs.python.org/2/library/re.html  Regular expression operations] that mentions &amp;quot;\\\\&amp;quot; explicitly. In this case, the backslash has to be escaped once for being part of a regular expression and then once more as the regular expression is inside a Python string. This is named in reference to the fact that the previous examples didn't contain enough escaping.&lt;br /&gt;
*The remaining five examples of backslashes have more and more occult names (explanations) and do not refer to any more real uses of backslash escapes:&lt;br /&gt;
**'''Elder backslash''': 5 backslashes would be a doubly-escaped backslash plus an unescaped one. The reference to {{w|Elder}} in the comic has many meanings. It has become known through fantasy media; Most prominent with the {{w|Elder Days}}, which are the first Ages of {{w|Middle-earth}} in {{w|The Silmarillion}}, the more-or-less prequel to {{w|The Lord of the Rings}}. More recently it has been used in the {{w|Harry Potter}} universe where the ''Deathly Hallow'' called the ''{{w|Magical_objects_in_Harry_Potter#Deathly_Hallows|Elder wand}}'', made from {{w|Sambucus|Elder wood}}, is a very important part of the last book ''{{w|Harry Potter and the Deathly Hallows}}''. Other examples are the {{w|Elder Gods}} of the {{w|Cthulhu Mythos}} as well as various 'Elder' magical items and beings in the {{w|Dungeons and Dragons}} mythologies.&lt;br /&gt;
**'''Backslash which escapes the screen and enters your brain''': 6 backslashes is a play on the word &amp;quot;escape&amp;quot; as the backslash is supposed to be an &amp;quot;escape character&amp;quot; but obviously not &amp;quot;escaping the screen&amp;quot; and entering your brain. This could also be understood as the programmer is getting backslashes on his mind, when he goes beyond the ''Elder backslash'' domain...&lt;br /&gt;
**'''Backslash so real it transcends time and space ''': 7 backslashes goes further than escaping the screen as they now {{w|Transcendence (philosophy)|transcends}} both {{w|Spacetime|time and space}}&lt;br /&gt;
**'''Backslash to end all other text''': 8 backslashes would be a triply-escaped backslash (same as 4 backslashes but with an additional escaping layer). It is said to &amp;quot;end all other text&amp;quot;, i.e. there should never be anymore text if someone uses eight in a row. But there could be more as indicated in the last example.&lt;br /&gt;
**'''The true name of Ba'al, the Soul-Eater''': {{w|Infinity|∞ backslashes}} (11 are shown but followed by &amp;quot;...&amp;quot; to indicate that they continue forever). If you could write an infinite number of backslashes it would actually be ''The true name of {{w|Baal (demon)|Ba'al}}, the {{w|Soul eater (folklore)|Soul-Eater}}''. This indicates that if you continue misusing backslashes like this you will end up devoured by a demon, for instance {{w|Beelzebub}}, for being so thoughtless... Ba'al has been mentioned before in the title text of [[1246: Pale Blue Dot]] and in [[1419: On the Phone]].&lt;br /&gt;
&lt;br /&gt;
===Backslash explosion and alternatives===&lt;br /&gt;
A reasonable example of a backslash explosion would be a {{w|PHP}} script on a web server which writes {{w|JavaScript}} code with a {{w|Regular Expression}} to be run on the client. If the JavaScript code has to test a string to see if ''it'' has a double-backslash, the Regular Expression to do so would be:&lt;br /&gt;
 \\\\&lt;br /&gt;
where the first two backslashes represent a single backslash and the second two also represent a single backslash, so this searches for two consecutive back slashes.&lt;br /&gt;
And the JavaScript would be:&lt;br /&gt;
 RegExp(&amp;quot;\\\\\\\\&amp;quot;).test(str);&lt;br /&gt;
where every two backslashes means just one backslashes in the string, so the 8 backslashes in JavaScript become 4 backslashes in the Regular Expression.&lt;br /&gt;
However, since this JavaScript code is to be written through a PHP script, the PHP code would be:&lt;br /&gt;
 echo &amp;quot;RegExp(\&amp;quot;\\\\\\\\\\\\\\\\\&amp;quot;).test(str);&amp;quot;;&lt;br /&gt;
where:&lt;br /&gt;
* The word &amp;lt;code&amp;gt;echo&amp;lt;/code&amp;gt; is the PHP command for writing something&lt;br /&gt;
* The first quote starts the string&lt;br /&gt;
* The &amp;lt;code&amp;gt;RegExp(&amp;lt;/code&amp;gt; - including the open parenthesis - is written literally&lt;br /&gt;
* The &amp;lt;code&amp;gt;\&amp;quot;&amp;lt;/code&amp;gt; following that is a literal quote to be written&lt;br /&gt;
* The first two slashes produce one single slash&lt;br /&gt;
* And so on until 8 backward slashes are written&lt;br /&gt;
* The next &amp;lt;code&amp;gt;\&amp;quot;&amp;lt;/code&amp;gt; produces a literal quote character&lt;br /&gt;
* The &amp;lt;code&amp;gt;).test(str);&amp;lt;/code&amp;gt; is written literally&lt;br /&gt;
* The next quote finishes the string.&lt;br /&gt;
* The final semicolon terminates the &amp;lt;code&amp;gt;echo&amp;lt;/code&amp;gt; command&lt;br /&gt;
So, the presented scenario has escalated from a simple test for &amp;lt;code&amp;gt;\\&amp;lt;/code&amp;gt; to no less than seventeen backslashes in a row without stepping out of the most common operations. &lt;br /&gt;
&lt;br /&gt;
If we go a bit further and try to write a {{w|Java (programming language)|Java}} program that outputs our PHP script, we'd have:&lt;br /&gt;
 System.out.println(&amp;quot;echo \&amp;quot;RegExp(\\\&amp;quot;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\&amp;quot;).test(str);\&amp;quot;;&amp;quot;);&lt;br /&gt;
Here, we have 35 backslashes in a row: the first 34 produce the 17 we need in our PHP script, and the last one is for escaping the quote character. (This comes closer to ''The true name of Ba'al, the Soul-Eater'').&lt;br /&gt;
&lt;br /&gt;
Some programming languages provide alternative matching string literal delimiters to limit situations where escaping of delimiters is needed. Often, one can begin and end a string with either a single quote or a double quote. This allows one to write &amp;lt;code&amp;gt;'This is a &amp;quot;quoted&amp;quot; string'&amp;lt;/code&amp;gt; if double quote marks are intended in the string literal or &amp;lt;code&amp;gt;&amp;quot;This is a 'quoted' string&amp;quot;&amp;lt;/code&amp;gt; if single quote marks are intended. Both kinds of delimiters can't be used in the same string literal, but if one needs to construct a string containing both kinds of quote marks one can often concatenate two string literals, each of which uses a different delimiter.&lt;br /&gt;
&lt;br /&gt;
Another feature that seems to be popular in modern programming languages is to provide an alternative syntax for string delimiters designed specifically to limit leaning toothpick syndrome. For example, in Python, a string literal starting with &amp;lt;code&amp;gt;r&amp;quot;&amp;lt;/code&amp;gt; is a &amp;quot;raw string&amp;quot;  [http://en.wikipedia.org/wiki/String_literal#Raw_strings] in which no escape processing is done, with similar semantics for a string starting with &amp;lt;code&amp;gt;@&amp;quot;&amp;lt;/code&amp;gt; in C#. This allows one to write &amp;lt;code&amp;gt;r&amp;quot;C:\Users&amp;quot;&amp;lt;/code&amp;gt; &amp;lt;!-- Note: In Python, backslashes can still escape the closing delimiter. r&amp;quot;C:\&amp;quot; is a SyntaxError. --&amp;gt; in Python or &amp;lt;code&amp;gt;@&amp;quot;C:\Users&amp;quot;&amp;lt;/code&amp;gt; in C# without the need to escape the backslash. This does &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; allow one to embed the terminating delimiter in the middle of the string and prevents the use of the backslash to encode the newline character as &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt;, but comes in handy when writing a string encoding of a regular expression in which the backslash is escaping one or more other punctuation characters or a shorthand character class (e.g., &amp;lt;code&amp;gt;\s&amp;lt;/code&amp;gt; for a whitespace character). For example, when looking for an anchor tag in HTML, I may encode the regular expression as &amp;lt;code&amp;gt;&amp;amp;lt;[Aa]\s[^&amp;amp;gt;]*&amp;amp;gt;&amp;lt;/code&amp;gt;. If I express this regular expression as a raw string literal, my code looks like  &amp;lt;code&amp;gt;r&amp;quot;&amp;amp;lt;[Aa]\s[^&amp;amp;gt;]*&amp;amp;gt;&amp;quot;&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;&amp;quot;&amp;amp;lt;[Aa]\\s[^&amp;amp;gt;]*&amp;amp;gt;&amp;quot;&amp;lt;/code&amp;gt;. The point here is that leaning toothpick syndrome is such a real problem that it has influenced programming language implementations.&lt;br /&gt;
&lt;br /&gt;
==Transcript==&lt;br /&gt;
:[A list of the names of different numbers of backslashes. After each &amp;quot;item&amp;quot; there is a gray line to the text describing each item. As the text is aligned above each other, the lines becomes shorter as the sequence of backslashes becomes longer until there is just a line with the length of a single hyphen for the last item. There are 1 to 8 backslashes and then 11 plus &amp;quot;...&amp;quot; in the last entry.]&lt;br /&gt;
:\&amp;lt;font color=&amp;quot;gray&amp;quot;&amp;gt;------------&amp;lt;/font&amp;gt; Backslash&lt;br /&gt;
:\\&amp;lt;font color=&amp;quot;gray&amp;quot;&amp;gt;-----------&amp;lt;/font&amp;gt; Real backslash&lt;br /&gt;
:\\\&amp;lt;font color=&amp;quot;gray&amp;quot;&amp;gt;----------&amp;lt;/font&amp;gt; ''Real'' real backslash&lt;br /&gt;
:\\\\&amp;lt;font color=&amp;quot;gray&amp;quot;&amp;gt;----------&amp;lt;/font&amp;gt; Actual backslash, for real this time&lt;br /&gt;
:\\\\\&amp;lt;font color=&amp;quot;gray&amp;quot;&amp;gt;---------&amp;lt;/font&amp;gt; Elder backslash&lt;br /&gt;
:\\\\\\&amp;lt;font color=&amp;quot;gray&amp;quot;&amp;gt;--------&amp;lt;/font&amp;gt; Backslash which escapes the screen and enters your brain&lt;br /&gt;
:\\\\\\\&amp;lt;font color=&amp;quot;gray&amp;quot;&amp;gt;-------&amp;lt;/font&amp;gt; Backslash so real it transcends time and space&lt;br /&gt;
:\\\\\\\\&amp;lt;font color=&amp;quot;gray&amp;quot;&amp;gt;------&amp;lt;/font&amp;gt; Backslash to end all other text&lt;br /&gt;
:\\\\\\\\\\\...&amp;lt;font color=&amp;quot;gray&amp;quot;&amp;gt;-&amp;lt;/font&amp;gt; The true name of Ba'al, the Soul-Eater&lt;br /&gt;
&lt;br /&gt;
==Note on Title Text==&lt;br /&gt;
The title text when first published was &lt;br /&gt;
&lt;br /&gt;
 I searched my .bash_history for the line with the highest ratio of special characters to regular alphanumeric characters, and the winner was: cat out.txt &amp;amp;#124; grep -o &amp;quot;\\\[[(].*\\\[\])][^)\]]*$&amp;quot; ... I have no memory of this and no idea what I was trying to do, but I sure hope it worked.&lt;br /&gt;
&lt;br /&gt;
It was changed within a few days to &lt;br /&gt;
&lt;br /&gt;
 I searched my .bash_history for the line with the highest ratio of special characters to regular alphanumeric characters, and the winner was: cat out.txt &amp;amp;#124; grep -o &amp;quot;[[(].*[])][^)]]*$&amp;quot; ... I have no memory of this and no idea what I was trying to do, but I sure hope it worked.&lt;br /&gt;
&lt;br /&gt;
The original title text seems to be more relevant to the comic, but the revised title text seems to make more sense as a legitimate command line due to the way backslashes are interpreted in regular expressions. See the Discussion below for much more on the topic.&lt;br /&gt;
&lt;br /&gt;
{{comic discussion}}&lt;br /&gt;
[[Category:Regex]]&lt;br /&gt;
[[Category:Programming]]&lt;/div&gt;</summary>
		<author><name>Jgro</name></author>	</entry>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=Talk:1638:_Backslashes&amp;diff=139212</id>
		<title>Talk:1638: Backslashes</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=Talk:1638:_Backslashes&amp;diff=139212"/>
				<updated>2017-04-25T02:23:21Z</updated>
		
		<summary type="html">&lt;p&gt;Jgro: Add alternate explanation for regex&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;It should be noted that this also occurs in almost every programming language where &amp;quot;\&amp;quot; is the escape character. i.e.&lt;br /&gt;
 print(&amp;quot;Hello&amp;quot;)&lt;br /&gt;
 &amp;gt; Hello&lt;br /&gt;
 print(&amp;quot;\&amp;quot;Hello\&amp;quot;&amp;quot;)&lt;br /&gt;
 &amp;gt; &amp;quot;Hello&amp;quot;&lt;br /&gt;
 print(&amp;quot;\\Hello\\&amp;quot;)&lt;br /&gt;
 &amp;gt; \Hello\&lt;br /&gt;
Oh, and by the way, isn't this the third comic to mention &amp;quot;Ba'al, the Soul Eater&amp;quot;? Maybe we should start a category. (Others are [http://www.explainxkcd.com/wiki/index.php/1246:_Pale_Blue_Dot 1246] (title text) and [http://www.explainxkcd.com/wiki/index.php/1419:_On_the_Phone 1419].)&lt;br /&gt;
[[Special:Contributions/173.245.54.29|173.245.54.29]] 06:14, 3 February 2016 (UTC)&lt;br /&gt;
:Did that before seeing you comment, so yes I agree. --[[User:Kynde|Kynde]] ([[User talk:Kynde|talk]]) 09:47, 3 February 2016 (UTC)&lt;br /&gt;
::But Davidy did not so the category has been deleted again. I have just cleaned up after my mess ;-) so there are no left over links to the dead category... --[[User:Kynde|Kynde]] ([[User talk:Kynde|talk]]) 22:27, 8 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
The last entry may also be an oblique reference to the infinitely-expandable recursive acronym &amp;quot;GOD = GOD Over Djinn&amp;quot; mentioned in Richard Hofstadter's Gödel, Escher, Bach.[[User:Taibhse|Taibhse]] ([[User talk:Taibhse|talk]]) 16:42, 3 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
;I don't think the regex is invalid&lt;br /&gt;
''Note: The regex changed after initial publication. See '''Changed Regex''' below''&lt;br /&gt;
&lt;br /&gt;
According to &amp;lt;tt&amp;gt;man grep&amp;lt;/tt&amp;gt; you need to specify the &amp;lt;tt&amp;gt;-E&amp;lt;/tt&amp;gt; option to use extended regex; without it unescaped parentheses are not interpreted, so they don't need to match.&lt;br /&gt;
&lt;br /&gt;
My - very wild - guess is that it was the command he used to find the line with the most special characters, but I am not confident enough to edit the article (if someone can confirm?). {{unsigned ip|141.101.66.83}}&lt;br /&gt;
&lt;br /&gt;
If it was supposed to do that, it doesn't work. Running it on my bash history matches no lines, and I have lots of special characters in there [[Special:Contributions/197.234.242.243|197.234.242.243]] 07:12, 3 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
Explain it to me like I'm dumb. What is this comic going on about? I think the explanation needs more examples like that hello, above, because that's almost understandable. --[[Special:Contributions/198.41.238.231|198.41.238.231]] 07:47, 3 February 2016 (UTC)&lt;br /&gt;
:I agree. But I cannot help either.--[[User:Kynde|Kynde]] ([[User talk:Kynde|talk]]) 09:51, 3 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
This is the third time Randall has mentioned Ba'al the Soul Eater xD [[User:International Space Station|International Space Station]] ([[User talk:International Space Station|talk]]) 08:26, 3 February 2016 (UTC)&lt;br /&gt;
:Yes, that was already mentioned a few hours before you comment, see the first comment. --[[User:Kynde|Kynde]] ([[User talk:Kynde|talk]]) 09:51, 3 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
After passing the regex through bash, you get &amp;lt;nowiki&amp;gt;\\[[(].*\\[\])][^)\]]*$&amp;lt;/nowiki&amp;gt; That is, the literal character \, followed by [ or (, followed by any number of any characters, followed by \, followed by ] or ), followed by any number of characters that aren't ) or ], until the end of the line. [[Special:Contributions/108.162.216.44|108.162.216.44]] 08:33, 3 February 2016 (UTC)&lt;br /&gt;
:It sounds like you know what you are talking about. Anyone who can explain it good enough for the explanation, and correct the explanation of the title text if it is wrong to say that it would not work. I have added this as the reason for incomplete. But maybe also examples are needed for people with not programming skills/knowledge. We also enjoy xkcd ;-) --[[User:Kynde|Kynde]] ([[User talk:Kynde|talk]]) 09:51, 3 February 2016 (UTC)&lt;br /&gt;
:I'm thinking that it's grepping for regular expressions that contain regular expressions. A regex containing &amp;lt;nowiki&amp;gt;&amp;quot;\[...\]&amp;quot;&amp;lt;/nowiki&amp;gt; or &amp;lt;nowiki&amp;gt;&amp;quot;\(...\)&amp;quot;&amp;lt;/nowiki&amp;gt; will match other regular expressions, as almost all non-trivial regexes use either character lists or groups. Now why out.txt is likely to contain not just regexes but rather regexes that search for regexes I have no idea - perhaps he had actually put too many backslashes in and he was trying to grep just for &amp;lt;nowiki&amp;gt;&amp;quot;[...]&amp;quot;&amp;lt;/nowiki&amp;gt; or &amp;lt;nowiki&amp;gt;&amp;quot;(...)&amp;quot;&amp;lt;/nowiki&amp;gt; (i.e. to locate probable regular expressions in out.txt, or anything else in parenthesis for that matter such as countless kinds of code/markup)? [[Special:Contributions/162.158.152.185|162.158.152.185]] 17:35, 4 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
For fun: &lt;br /&gt;
 cat ~/.bash_history | xargs -d &amp;quot;\n&amp;quot; -n 1 -I {} bash -c 'chars=&amp;quot;$(echo &amp;quot;$1&amp;quot; | grep -o &amp;quot;[a-zA-Z0-9 ]&amp;quot; | wc -l)&amp;quot;; echo &amp;quot;$(( 100 - $(( $chars * 100 / ${#1} )) )) $1&amp;quot;' _ {} | sort -nrk 1 | less&lt;br /&gt;
&lt;br /&gt;
Outputs your bash_history, ordered by relative gibberishness. This was copied by hand from desktop to mobile, might well have a few typos.--[[Special:Contributions/162.158.90.208|162.158.90.208]] 10:04, 3 February 2016 (UTC)&lt;br /&gt;
::Besides the fact that -d is a GNU extension to xargs (so it won't exist on OS X, FreeBSD, or anything else but Linux), this is a weird way to calculate gibberishness; I'm guessing functions, variable substitutions, .. and ./, etc. are going to swamp the more unreadable grep and the like. Plus, I think you need a uniq in there somewhere; otherwise, aren't the first few pages are all going to be filled with the 78 copies of &amp;quot;422 cd ..&amp;quot; that tied for most gibberishy in my last 500 commands? --[[Special:Contributions/162.158.255.82|162.158.255.82]] 22:51, 7 March 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
The problem in the comic is not with regexes per se but with situations when the entered text or expression passes through several interpreters, like bash -&amp;gt; grep/sed/awk, or program text -&amp;gt; external shell command. In such cases, you have to escape backslashes for each program in the sequence, and it gets worse if you have 'real' backslashes in the final text that you're processing with the utilities (Windows' file paths, for example). See https://en.wikipedia.org/wiki/Leaning_toothpick_syndrome.&lt;br /&gt;
Feel free to lift this to the explanation page, since I'm not good at longer and more careful explanations than this one.&lt;br /&gt;
Also, gotta notice that Feedly stripped paired backslashes in the title text (probably passed it through some 'interpreter' embedded in its scripts). [[User:Aasasd|Aasasd]] ([[User talk:Aasasd|talk]]) 10:13, 3 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
:A funny comment about the MediaWiki software, which is even worse than this comic: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;Nikerabbit&amp;gt; I looked the code for rlike and didn't find where it does this. Can you point me to it? &amp;lt;vvv&amp;gt; $pattern = preg_replace( '!(\\\\\\\\\\\\\\\\)*(\\\\\\\\)?/!', '$1\\/', $pattern ); &amp;lt;Nikerabbit&amp;gt; I thought that was ascii art :)&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; ([https://phabricator.wikimedia.org/P110$275 source]) --[[Special:Contributions/162.158.91.215|162.158.91.215]] 10:18, 3 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
Interestingly, I first looked at this on my phone (using &amp;lt;strike&amp;gt;Chrome&amp;lt;/strike&amp;gt; Feedly for Android), but the title text did not display correctly in that the backslashes didn't appear (which was a little confusing!). In Chrome on my Windows desktop, the title text appeared correctly. [[User:Jdluk|Jdluk]] ([[User talk:Jdluk|talk]]) 11:36, 3 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
enough with the harry potter fancruft. &amp;quot;elder&amp;quot; is a [[Wiktionary:elder|perfectly good word]]. just because you came across it for the first time in harry potter means you are *typing carefully* the kind of person that likes harry potter. unless this is a ''harry potter reference'' wiki, of course. in which case i'll prepare a complete list of every word that appears both here and there and put a list on every page. oh, right, no i won't. --[[Special:Contributions/141.101.106.161|141.101.106.161]] 12:41, 3 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
Remember that &amp;quot;Elder&amp;quot; is used in a lot of RPGs to denote high level enemies or items. I feel like that's what Randall's referring to here, more than Harry Potter or the general sense of the term &amp;quot;Elder.&amp;quot; {{unsigned ip|108.162.245.156}}&lt;br /&gt;
: +1. Between the fact that harry potter (, ages, or tribes) aren't mentioned anywhere else in the text and the comic being a progressive list, I see this being the most likely explanation. Plus the metion of demons, which are easily the most* common usage of the modifier.&lt;br /&gt;
:: (*) or second most, after &amp;quot;elder gods&amp;quot;, who are, let's face it, also demons. [[Special:Contributions/162.158.180.125|162.158.180.125]] 14:41, 3 February 2016 (UTC)&lt;br /&gt;
::: I'm pretty sure that &amp;quot;Elder backslash&amp;quot; is in reference to the &amp;quot;Elder gods&amp;quot; of Lovecraft. [[Special:Contributions/173.245.54.35|173.245.54.35]] 16:51, 3 February 2016 (UTC)&lt;br /&gt;
:::: Note also that it's called 'The Elder Wand' not as an intensifier, as in this comic and the other examples given, but because it is literally ''made from the wood of an [https://en.wikipedia.org/wiki/Sambucus_nigra Elder Tree]'' I'm pretty sure it's not an intentional reference. -Graptor [[Special:Contributions/173.245.54.23|173.245.54.23]] 19:29, 3 February 2016 (UTC)&lt;br /&gt;
::::: If it's an intentional reference to anything, it's to Lovecraft (or to something similar). I suspect the Elder Wand was an intentional pun by Rowling, however. --[[Special:Contributions/162.158.180.137|162.158.180.137]] 04:16, 4 February 2016 (UTC)&lt;br /&gt;
::::: Since no-one else seemed to want to, I just restructured that paragraph to make it more clear that if anything Harry Potter was inspired by the older examples, not the other way around. Expanded the LOTR reference and added DnD. If anything Randall is likely to be referencing either the Lovecraft references, or the concept of Elder in general. [[Special:Contributions/141.101.64.173|141.101.64.173]] 11:50, 4 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
Attempting to add to the discussion: This regex is not necessarily invalid or incomprehensible.  (''Note: The regex changed after initial publication. See '''Changed Regex''' below.'') It looks like he was looking for a line with a regular expression or definitely some code.  You just have to work your way through the backslashes.  Although it might be invalid depending on the precise rules.  He has some unescaped closing brackets and closing parenthesis.  If these have to always be escaped then the regex is invalid.  If however you  don't have to escape a closing bracket with no opening bracket, then things are fine.  I'm not familiar enough with grep's regex parser to know how it handles that edge case.  Presuming those unescaped paren and brackets are fine, his regex searches for:&lt;br /&gt;
&lt;br /&gt;
1. A backslash&lt;br /&gt;
&lt;br /&gt;
2. An opening bracket&lt;br /&gt;
&lt;br /&gt;
3. An opening parenthesis (this is a character set but the only character in it is an opening paren)&lt;br /&gt;
&lt;br /&gt;
4. Any number of any characters&lt;br /&gt;
&lt;br /&gt;
5. A backslash&lt;br /&gt;
&lt;br /&gt;
6. An opening bracket&lt;br /&gt;
&lt;br /&gt;
7. A closing bracket&lt;br /&gt;
&lt;br /&gt;
8. A closing paren (presuming it doesn't have to be escaped when there is no opening paren)&lt;br /&gt;
&lt;br /&gt;
9. A closing bracket (presuming it doesn't have to be escaped when there is no opening bracket)&lt;br /&gt;
&lt;br /&gt;
10. Any number of character that are not a closing paren or closing bracket&lt;br /&gt;
&lt;br /&gt;
11. The end of the line&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Basically he is looking for a string that looks like:&lt;br /&gt;
&lt;br /&gt;
\[(AAAAA\[])]AAAAA&lt;br /&gt;
&lt;br /&gt;
Looks like a regex to me, and it looks like this regex also doesn't escape closing paren/brackets that don't have an opening paren/bracket, so I'm guessing that he knows what he is doing and his regex is fine.  Maybe he was playing regex golf?&lt;br /&gt;
[[User:Cmancone|Cmancone]] ([[User talk:Cmancone|talk]])cmancone&lt;br /&gt;
&lt;br /&gt;
Ninjaed by Cmancone, above. I agree with that result in every respect except for the start-of-string being potentially anything, but putting my own analysis in here because it took long enough to type!&lt;br /&gt;
&lt;br /&gt;
Depth-of-backslash might depend upon depth of utility. In Perl, &amp;lt;nowiki&amp;gt;''&amp;lt;/nowiki&amp;gt;-quotes (among others) treat everything within as literal whilst &amp;quot;&amp;quot;-quotes (and variations) interpolates any special characters, variables, etc that you put in it.  (Search for &amp;quot;Quote and Quote-like operators&amp;quot; in your favourite PerlDocs source.)  '\sss' is a literal backslash followed by three 's' characters , while &amp;quot;\sss&amp;quot; is the special \s escape (a whitespace) followed by two further regular characters.  You might need to define the first when you need to use it to provide a not-previously-escaped \s so that it might be escaped within another context.  ''Or'' you define it as &amp;quot;\\sss&amp;quot; (escaped-\) the first time, as equivalent to '\sss'.  But '\\sss' would be a literal that, later, could be interpreted as an escaped-\ to the input of a further context where the \s finally becomes 'match a whitespace'.&lt;br /&gt;
 &lt;br /&gt;
'\\\sss' would be literal, whilst &amp;quot;\\\sss&amp;quot; could be equivalent to '\ ss' (literal backslash, literal space, rest of characters).  Then, instead of literal '\\sss', for some purpose, you could interpolate two escaped-backslashes &amp;quot;\\\\sss&amp;quot;... and so on.&lt;br /&gt;
 &lt;br /&gt;
Meanwhile I ''think'', just from visual inspection, &amp;quot;'''\\\[[(].*\\\[\])][^)\]]*$'''&amp;quot; in Bash should obey the interpolation rules quite nicely.  The first two characters must be a literal backslash (from the escaped-backslash) and a literal open-square bracket (again, escaped).  The next open-square and the close-square shortly after depict a character class that contains only an open-parenthesis, and could have been written as '''\('''.&lt;br /&gt;
 &lt;br /&gt;
The '''.*''' indicates zero-or-more (the asterix) instances of ''any'' character (the dot).  There is then a literal backslash (from the next '''\\''' duo) and a literal open-square (the '''\[''' pair) and close-square (the '''\]''' pair).  The ''')''' is literal and does not need escaping (as a parenthesis group had not yet been opened), as is the next ''']''' character.  To be sure, I would have written these two as the pair escapes '''\)\]''', but horses for courses...&lt;br /&gt;
 &lt;br /&gt;
Then there's another character class (the next '''[''' and the final ''']''') required zero-or-more times (the asterix) to use up all the rest of the characters to the end (the ending '''$''' character).  As there was no '''^''' character (a.k.a. caret/circumflex/etc) at the start, the match isn't bothered about what unmatched characters appear before the original '''\('''.  This character class, however, starts with a '''^''' which in this context (the very first character of a character-class definition, not somewhere where an entire match-string starts) indicates negation of the following selection, so it is all characters ''but'' those specified, which is the regular close-parenthesis and (because it needs to be contained within a '''[]''' pair) the escaped close-square.&lt;br /&gt;
 &lt;br /&gt;
So, all matching strings must start with '''\[(''', i.e. the backslash, open-square and open-paren.  They can continue with ''any'' further text, before then having a '''\[])]''', i.e. backslash, open-and-close-squares and close-paren, close-square.  After this, the match continues just as long as there are no non-closing square/classic brackets before the ending.&lt;br /&gt;
 &lt;br /&gt;
The minimum matching literal string would be '''\[(\[])]''' with longer variants being of the form '''X\[(Y\[])]Z''' where X and Y can be replaced by anything (or be absent), and Z can be replaced by anything (or absent!) ''so long as it doesn't contain possibly relevent close-brackets!''. The latter stipulation is likely because the Y (and X) ''is'' allowed to contain these characters, and for some reason you don't want to confuse the test by finding some other '''\[])]''' segment within the X/Y-zones.  (In this context, it doesn't actually seem to matter too much.  But it might do in ways I haven't spotted or just be a hang-over from a prior permutation of the test.)&lt;br /&gt;
 &lt;br /&gt;
The &amp;quot;grep -o&amp;quot; function is working on the output to the file being '''cat'''ed (there are alternate ways of doing this that some people might prefer), to only accept the lines in the file that match the '''X\[(Y\[])]Z''' string.  These lines would appear to be lines of out.txt (a fairly generic name that reveals little to its original purpose) that are well-formed for some other purpose.  A safety-escaped (i.e. not to be taken literally by any simple parser) '''[]'''-grouping containing a '''()'''-group (''not'' escaped, perhaps reasonably in context) containing potentially random text followed by an empty '''[]''' pair (again, safety-escaped).  Depending on the source, the empty '''[]'''-pair could mean many things, as with the other layers.  And the lines may end with any further text.&lt;br /&gt;
 &lt;br /&gt;
The &amp;quot;out.txt&amp;quot; file might be the result of a prior Grep (string-search function) quote possibly scanning code for lines of particular importance by another pattern and dumping the results to out.txt for further perusal.  And then Randall finds the need to dig further into the first result by extracting just those already selected that all have the '''X\[(Y\[])Z]'''-ish pattern to them.&lt;br /&gt;
 &lt;br /&gt;
But I could be wrong, and that's way too long for an official explanation.&lt;br /&gt;
(Perhaps just something like the penultimate paragraph, if we're not entirely mistaken?) [[Special:Contributions/162.158.152.89|162.158.152.89]] 14:14, 3 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
The regex is supposed to be looking for (''Note: The regex changed after initial publication. See '''Changed Regex''' below.''):&lt;br /&gt;
 \\\      backslash&lt;br /&gt;
 [[(]     [ or (&lt;br /&gt;
 .*       any character (repeated 0 or more times)&lt;br /&gt;
 space    space&lt;br /&gt;
 \\\      backslash&lt;br /&gt;
 [[\])]   probably meant to match either [, ] or ). However, it's not correct, it instead matches the literal characters [)]&lt;br /&gt;
 [^)\]]*  probably meant to match any character that isn't ) or ], repeated. Instead it means one character that's not a ), and then a ] zero or more times&lt;br /&gt;
 $        end of string&lt;br /&gt;
&lt;br /&gt;
The first problem is that you're not supposed to escape ] in a [...], and it also has to be first in the grouping (unless negated with a ^) It should be [][)] or something similar.&lt;br /&gt;
&lt;br /&gt;
The second problem is the same. The last bit should be [^])]*$ and not [^)\]]*$. [[User:Khris|Khris]] ([[User talk:Khris|talk]]) 14:24, 3 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I was reading through the regex, if using grep you run into an error with an unmatched &amp;quot;)&amp;quot;.  Removing this gets a string such as \[(AAAAA\[]]AAAAA$  http://regexr.com/3cng8 [[Special:Contributions/162.158.214.230|162.158.214.230]] 14:42, 3 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The regex relies on several special cases (*surprise*). (''Note: The regex changed after initial publication. See '''Changed Regex''' below.'')&lt;br /&gt;
First: bash double-quote expansion (see [https://www.gnu.org/software/bash/manual/html_node/Double-Quotes.html#Double-Quotes]). Perhaps non-intuitively, \\\ followed by a character that \ doesn't escape is an escaped backslash followed by a literal backslash, effectively the same as \\\\ followed by that same non-escaped character.  After bash double-quote expansion, this results in:&lt;br /&gt;
&lt;br /&gt;
\\[[(].*\\[\])][^)\]]*$&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
grep interprets this as:&lt;br /&gt;
&lt;br /&gt;
# any leading non-\ characters&lt;br /&gt;
# literal backslash&lt;br /&gt;
# character class containing [ and (&lt;br /&gt;
# zero or more *any* characters&lt;br /&gt;
# another literal backslash&lt;br /&gt;
# yet another literal backslash, via a character class containing only a backslash.  Note this does not contain an escaped ], as it might appear at first glance.  See [http://www.gnu.org/software/grep/manual/html_node/Character-Classes-and-Bracket-Expressions.html]&lt;br /&gt;
# literal )&lt;br /&gt;
# literal ]&lt;br /&gt;
# character class of anything except ), \&lt;br /&gt;
# zero or more ]&lt;br /&gt;
# end of line&lt;br /&gt;
&lt;br /&gt;
Matching examples:&lt;br /&gt;
*echo 'asdf\[asdfasdf\\)]a]]]]]]' | grep -o &amp;quot;\\\[[(].*\\\[\])][^)\]]*$&amp;quot;&lt;br /&gt;
*echo '\(\\)]P' | grep -o &amp;quot;\\\[[(].*\\\[\])][^)\]]*$&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Special:Contributions/108.162.216.34|108.162.216.34]] 16:14, 3 February 2016 (UTC)rb&lt;br /&gt;
&lt;br /&gt;
One key thing to understand is that \ is not a special character when it's in a bracket expression - you can't escape characters in bracket expressions. So [^)\] simply means any character other then ) or \. Also, ( and ) are just regular characters unless they are escaped in basic regular expressions - extended regular expressions reverse this rule. {{unsigned|Kalfalfa}}&lt;br /&gt;
&lt;br /&gt;
I don't know about the regular expression in the title text, but I think the explanation is incorrect in that it starts off talking about regular expressions. Escaping backslashes is an issue with strings in programming in general. [[Special:Contributions/173.245.54.46|173.245.54.46]] 17:12, 3 February 2016 (UTC)&lt;br /&gt;
----&lt;br /&gt;
I suspect that Randall may have used the regexp in the title text to *find* malformed regular expressions in a file (out.txt) that he (or someone) had previously filled with output from some error message (or collection of error messages, or at least the output of something where a regular expression had been expected to work but had not worked as expected). [[Special:Contributions/162.158.252.227|162.158.252.227]] 19:06, 3 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
You can use metacharacters in character classes, the only metacharacters in a character class that must be escaped are the closing square bracket (]), the backslash (\), the hyphen, and the carat and hyphen (^) if they are the first listed item in the set. The closing square bracket requires escaping because including it without would signal the end of the set otherwise, which then means the backslash must also be escaped. The hyphen must be escaped because, without it, it signals a range (unless it is listed first, then it is literal without escaping). Carat when listed first because otherwise it signals a negative set.&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, the end of the title text regex matches a backslash followed by either ] or ), which is then followed by any number (including none) of characters so long as they are not ] nor ) which means the whole regex can match &amp;quot;&amp;lt;span style=&amp;quot;color:#040;&amp;quot;&amp;gt;\[something\] more&amp;lt;/span&amp;gt;&amp;quot; or &amp;quot;&amp;lt;span style=&amp;quot;color:#040;&amp;quot;&amp;gt;\(something\)more&amp;lt;/span&amp;gt;&amp;quot; or &amp;quot;&amp;lt;span style=&amp;quot;color:#040;&amp;quot;&amp;gt;\[something\) more&amp;lt;/span&amp;gt;&amp;quot; as well as &amp;quot;&amp;lt;span style=&amp;quot;color:#040;&amp;quot;&amp;gt;\[something\]&amp;lt;/span&amp;gt;&amp;quot;. — [[Special:Contributions/162.158.255.117|162.158.255.117]] 01:16, 4 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
I'll add that I use an ''almost identical'' regex in my mail server for matching mailing-list subject lines which often have a format of &amp;quot;&amp;lt;span style=&amp;quot;color:#040;&amp;quot;&amp;gt;[Listname] normal subject line&amp;lt;/span&amp;gt;&amp;quot; which made it pretty recognizable to me. — [[Special:Contributions/162.158.255.117|162.158.255.117]] 01:24, 4 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
;Example of a match&lt;br /&gt;
''Note: The regex changed after initial publication. See '''Changed Regex''' below''&lt;br /&gt;
&lt;br /&gt;
First, the shell will do some escaping substitution. So, in order to easily read it, let's see what grep really receives:&lt;br /&gt;
&lt;br /&gt;
 $ echo &amp;quot;\\\[[(].*\\\[\])][^)\]]*$&amp;quot;&lt;br /&gt;
 \\[[(].*\\[\])][^)\]]*$&lt;br /&gt;
&lt;br /&gt;
Let's break it out:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;\\&amp;lt;/code&amp;gt; matches a &amp;lt;code&amp;gt;\&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[(]&amp;lt;/code&amp;gt; matches either a &amp;lt;code&amp;gt;[&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.*&amp;lt;/code&amp;gt; matches any series of characters until the next match&lt;br /&gt;
* &amp;lt;code&amp;gt;\\&amp;lt;/code&amp;gt; matches a &amp;lt;code&amp;gt;\&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[\]&amp;lt;/code&amp;gt; matches a &amp;lt;code&amp;gt;\&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;)]&amp;lt;/code&amp;gt; matches &amp;lt;code&amp;gt;)]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[^)\]&amp;lt;/code&amp;gt; matches anything but &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;\&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;]*&amp;lt;/code&amp;gt; matches any number of &amp;lt;code&amp;gt;]&amp;lt;/code&amp;gt; (including none)&lt;br /&gt;
* &amp;lt;code&amp;gt;$&amp;lt;/code&amp;gt; matches the end of the string&lt;br /&gt;
&lt;br /&gt;
So the string '''\[aaa\]\\)]a]]]]]]''' matches! {{unsigned ip|108.162.228.167}}&lt;br /&gt;
&lt;br /&gt;
...Maybe it's meant to search for all Game Grumps transcripts which make mention of the &amp;quot;[http://gamegrumps.wikia.com/wiki/Grep Grep]&amp;quot; gag? [[Special:Contributions/108.162.216.55|108.162.216.55]] 15:53, 3 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
...Wow, guys, and here I was thinking he wanted to put the cat out, when the cat didn't want to go out.... [[Special:Contributions/108.162.249.158|108.162.249.158]] 04:03, 4 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
What I think is that Randall probably ''intended'' the regex to match &amp;quot;backslash, opening round or square bracket, anything, backslash, closing round or square bracket, anything that doesn't involve closing round or square brackets&amp;quot;, since (unlike most other possibilities given) that actually looks like something one might want to search for. Whether it ''does'', in fact, match that or something else (or indeed anything at all) is another question entirely. (For all we know, it didn't work, Randall figured out it didn't, and wrote the correct thing the next line over.)&amp;lt;br&amp;gt;Unrelatedly: this comic (and the backslash proliferation in general) reminded me of the Telnet Song. --[[Special:Contributions/162.158.180.137|162.158.180.137]] 04:16, 4 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
That explanation is wrong: &amp;lt;code&amp;gt;[\]&amp;lt;/code&amp;gt; does not match a literal backslash; it would still need to be escaped inside the brackets. That backslash escapes the next character, a ], so the group doesn't end there. The actual expression there is &amp;lt;code&amp;gt;[\])]&amp;lt;/code&amp;gt;, a character group containing an escaped ] and a ). Just like the first part. It is most likely intended to catch content surrounded by [ ] or ( ). [[Special:Contributions/141.101.104.15|141.101.104.15]] 13:43, 4 February 2016 (UTC)&lt;br /&gt;
:To clarify: this makes the expression catch anything that starts with a block surrounded by escaped round or square brackets. So stuff like '''\(Hello world\)more text here''' but with either round or square brackets (or combinations, since there's nothing enforcing they have to match. I'd have made it an OR case with two groups with matching brackets, personally) -[[Special:Contributions/141.101.104.15|141.101.104.15]] 13:51, 4 February 2016 (UTC)&lt;br /&gt;
:You're making the same mistake Randall did: while many (most?) regex dialects use \ as escape inside a character class, this is not true for grep's default syntax. I've expanded that interpretation in my comment below, however the analysis by 108.162.228.167 is a correct explanation of how this expression is ''actually'' interpreted by grep. --[[Special:Contributions/141.101.75.185|141.101.75.185]] 15:42, 4 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
Your analysis is thorough and correct, however it is unlikely this is what the regex was intended to accomplish. (''Note: The regex changed after initial publication. See '''Changed Regex''' below.'') More likely, Randall is more accustomed to other regex dialects such as Perl(-compatible) regex where a backslash ''does'' work to escape special characters inside a character class.  Under that assumption the regex (with some whitespace inserted for readability) would break up as:&lt;br /&gt;
* &amp;lt;code&amp;gt;\\ [[(]&amp;lt;/code&amp;gt; an escaped opening bracket or paren&lt;br /&gt;
* &amp;lt;code&amp;gt;.*&amp;lt;/code&amp;gt; anything&lt;br /&gt;
* &amp;lt;code&amp;gt;\\ [\])]&amp;lt;/code&amp;gt; an escaped closing bracket or paren&lt;br /&gt;
* &amp;lt;code&amp;gt;[^)\]]* $&amp;lt;/code&amp;gt; no closing bracket or paren occurring on the remainder of the line&lt;br /&gt;
Although the final condition is still a bit obscure, this still makes a ''lot'' more sense. Unfortunately it also crushes Randall's hope the regex worked as intended, since this simply isn't how the expression is parsed with grep's default syntax (which is why I always use &amp;lt;code&amp;gt;grep -P&amp;lt;/code&amp;gt;). --[[Special:Contributions/141.101.75.185|141.101.75.185]] 15:34, 4 February 2016 (UTC)&lt;br /&gt;
----&lt;br /&gt;
Did anyone notice the [https://en.wikipedia.org/wiki/Cat_%28Unix%29#Useless_use_of_cat Useless Use of Cat]? [[Special:Contributions/141.101.106.101|141.101.106.101]] 19:36, 4 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Yup - I hereby award Randall with the Useless Use of Cat Award of the day. Cherish it.&lt;br /&gt;
:[[User:Zedn00|Zedn00]] ([[User talk:Zedn00|talk]]) 03:51, 5 February 2016 (UTC) Zedn00&lt;br /&gt;
----&lt;br /&gt;
;Changed Regex&lt;br /&gt;
At some point before 2016-02-09 18:00 +0100, Randall has modified the bash command in the title text!&lt;br /&gt;
&lt;br /&gt;
Original command:&lt;br /&gt;
 cat out.txt | grep -o &amp;quot;\\\[[(].*\\\[\])][^)\]]*$&amp;quot;&lt;br /&gt;
New command:&lt;br /&gt;
 cat out.txt | grep -o &amp;quot;[[(].*[])][^)]]*$&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For the old command, 108.162.228.167's and 108.162.216.34's explanations above were correct.&lt;br /&gt;
&lt;br /&gt;
The new command matches:&lt;br /&gt;
 [[(]  either a '[' or a '('&lt;br /&gt;
 .*    an unbounded and possibly empty sequence of arbitrary characters&lt;br /&gt;
 [])]  either a ']' or a ')'&lt;br /&gt;
 [^)]  any character except for a ')'&lt;br /&gt;
 ]*    an unbounded and possibly empty sequence of ']'&lt;br /&gt;
 $     anchored at end of line&lt;br /&gt;
&lt;br /&gt;
It now e.g. matches '''123[abc.&amp;lt;&amp;gt;)x]]]]]''':&lt;br /&gt;
 $ echo &amp;quot;123[abc.&amp;lt;&amp;gt;)x]]]]]&amp;quot; | tee /dev/stderr | grep -o &amp;quot;[[(].*[])][^)]]*$&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This makes hardly more sense than the original command.&lt;br /&gt;
--[[User:Markus|Markus]] ([[User talk:Markus|talk]]) 17:38, 9 February 2016 (UTC)&lt;br /&gt;
:Randal may have been sincere about finding it in his history and wondering if it worked. I think he probably meant &lt;br /&gt;
 cat out.txt | grep -o &amp;quot;[[(].*[])][^])]*$&amp;quot;&lt;br /&gt;
&lt;br /&gt;
:which breaks down as:&lt;br /&gt;
 [[(]  either a '[' or a '('&lt;br /&gt;
 .*    an unbounded and possibly empty sequence of arbitrary characters&lt;br /&gt;
 [])]  either a ']' or a ')'&lt;br /&gt;
 [^])]*  any number of any characters except for a ')' or ']'&lt;br /&gt;
 $     anchored at end of line&lt;br /&gt;
&lt;br /&gt;
:This matches any line that has a '[' or '(' followed by a ')' or ']', matching from the first '[' or '(' to the end of the line. The final part of the regex, '[^])]*$', is not really necessary here, but it is a common pattern to follow a character pattern with an opposite character pattern to be sure the first character pattern matches the last instance of a repeating character, so he might have added it out of habit, which would explain also why he got it wrong (since he just followed '[blah]' with '[^blah]' which in this special case doesn't work because 'blah' has a special character in it: ']').&lt;br /&gt;
:[[User:Jgro|Concerned Netizen]] ([[User talk:Jgro|talk]]) 02:23, 25 April 2017 (UTC)&lt;br /&gt;
----&lt;br /&gt;
Funny enough, I'm literally looking at some other dev's code right now that actually implements an eight backslash regex sequence, with just the comment &amp;quot;backslash&amp;quot;. I'm still scratching my head over what they were trying to accomplish or even communicate with this. [[User:Domino|Domino]] ([[User talk:Domino|talk]]) 21:45, 16 August 2016 (UTC)domino&lt;br /&gt;
----&lt;br /&gt;
I believe the regex is a reference to xkcd 1313 (Regex Golf)&lt;br /&gt;
[[Special:Contributions/108.162.221.90|108.162.221.90]] 16:08, 26 August 2016 (UTC)&lt;/div&gt;</summary>
		<author><name>Jgro</name></author>	</entry>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=Talk:1638:_Backslashes&amp;diff=139210</id>
		<title>Talk:1638: Backslashes</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=Talk:1638:_Backslashes&amp;diff=139210"/>
				<updated>2017-04-25T02:02:00Z</updated>
		
		<summary type="html">&lt;p&gt;Jgro: Added notes that the regex changed after publication&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;It should be noted that this also occurs in almost every programming language where &amp;quot;\&amp;quot; is the escape character. i.e.&lt;br /&gt;
 print(&amp;quot;Hello&amp;quot;)&lt;br /&gt;
 &amp;gt; Hello&lt;br /&gt;
 print(&amp;quot;\&amp;quot;Hello\&amp;quot;&amp;quot;)&lt;br /&gt;
 &amp;gt; &amp;quot;Hello&amp;quot;&lt;br /&gt;
 print(&amp;quot;\\Hello\\&amp;quot;)&lt;br /&gt;
 &amp;gt; \Hello\&lt;br /&gt;
Oh, and by the way, isn't this the third comic to mention &amp;quot;Ba'al, the Soul Eater&amp;quot;? Maybe we should start a category. (Others are [http://www.explainxkcd.com/wiki/index.php/1246:_Pale_Blue_Dot 1246] (title text) and [http://www.explainxkcd.com/wiki/index.php/1419:_On_the_Phone 1419].)&lt;br /&gt;
[[Special:Contributions/173.245.54.29|173.245.54.29]] 06:14, 3 February 2016 (UTC)&lt;br /&gt;
:Did that before seeing you comment, so yes I agree. --[[User:Kynde|Kynde]] ([[User talk:Kynde|talk]]) 09:47, 3 February 2016 (UTC)&lt;br /&gt;
::But Davidy did not so the category has been deleted again. I have just cleaned up after my mess ;-) so there are no left over links to the dead category... --[[User:Kynde|Kynde]] ([[User talk:Kynde|talk]]) 22:27, 8 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
The last entry may also be an oblique reference to the infinitely-expandable recursive acronym &amp;quot;GOD = GOD Over Djinn&amp;quot; mentioned in Richard Hofstadter's Gödel, Escher, Bach.[[User:Taibhse|Taibhse]] ([[User talk:Taibhse|talk]]) 16:42, 3 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
;I don't think the regex is invalid&lt;br /&gt;
''Note: The regex changed after initial publication. See '''Changed Regex''' below''&lt;br /&gt;
&lt;br /&gt;
According to &amp;lt;tt&amp;gt;man grep&amp;lt;/tt&amp;gt; you need to specify the &amp;lt;tt&amp;gt;-E&amp;lt;/tt&amp;gt; option to use extended regex; without it unescaped parentheses are not interpreted, so they don't need to match.&lt;br /&gt;
&lt;br /&gt;
My - very wild - guess is that it was the command he used to find the line with the most special characters, but I am not confident enough to edit the article (if someone can confirm?). {{unsigned ip|141.101.66.83}}&lt;br /&gt;
&lt;br /&gt;
If it was supposed to do that, it doesn't work. Running it on my bash history matches no lines, and I have lots of special characters in there [[Special:Contributions/197.234.242.243|197.234.242.243]] 07:12, 3 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
Explain it to me like I'm dumb. What is this comic going on about? I think the explanation needs more examples like that hello, above, because that's almost understandable. --[[Special:Contributions/198.41.238.231|198.41.238.231]] 07:47, 3 February 2016 (UTC)&lt;br /&gt;
:I agree. But I cannot help either.--[[User:Kynde|Kynde]] ([[User talk:Kynde|talk]]) 09:51, 3 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
This is the third time Randall has mentioned Ba'al the Soul Eater xD [[User:International Space Station|International Space Station]] ([[User talk:International Space Station|talk]]) 08:26, 3 February 2016 (UTC)&lt;br /&gt;
:Yes, that was already mentioned a few hours before you comment, see the first comment. --[[User:Kynde|Kynde]] ([[User talk:Kynde|talk]]) 09:51, 3 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
After passing the regex through bash, you get &amp;lt;nowiki&amp;gt;\\[[(].*\\[\])][^)\]]*$&amp;lt;/nowiki&amp;gt; That is, the literal character \, followed by [ or (, followed by any number of any characters, followed by \, followed by ] or ), followed by any number of characters that aren't ) or ], until the end of the line. [[Special:Contributions/108.162.216.44|108.162.216.44]] 08:33, 3 February 2016 (UTC)&lt;br /&gt;
:It sounds like you know what you are talking about. Anyone who can explain it good enough for the explanation, and correct the explanation of the title text if it is wrong to say that it would not work. I have added this as the reason for incomplete. But maybe also examples are needed for people with not programming skills/knowledge. We also enjoy xkcd ;-) --[[User:Kynde|Kynde]] ([[User talk:Kynde|talk]]) 09:51, 3 February 2016 (UTC)&lt;br /&gt;
:I'm thinking that it's grepping for regular expressions that contain regular expressions. A regex containing &amp;lt;nowiki&amp;gt;&amp;quot;\[...\]&amp;quot;&amp;lt;/nowiki&amp;gt; or &amp;lt;nowiki&amp;gt;&amp;quot;\(...\)&amp;quot;&amp;lt;/nowiki&amp;gt; will match other regular expressions, as almost all non-trivial regexes use either character lists or groups. Now why out.txt is likely to contain not just regexes but rather regexes that search for regexes I have no idea - perhaps he had actually put too many backslashes in and he was trying to grep just for &amp;lt;nowiki&amp;gt;&amp;quot;[...]&amp;quot;&amp;lt;/nowiki&amp;gt; or &amp;lt;nowiki&amp;gt;&amp;quot;(...)&amp;quot;&amp;lt;/nowiki&amp;gt; (i.e. to locate probable regular expressions in out.txt, or anything else in parenthesis for that matter such as countless kinds of code/markup)? [[Special:Contributions/162.158.152.185|162.158.152.185]] 17:35, 4 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
For fun: &lt;br /&gt;
 cat ~/.bash_history | xargs -d &amp;quot;\n&amp;quot; -n 1 -I {} bash -c 'chars=&amp;quot;$(echo &amp;quot;$1&amp;quot; | grep -o &amp;quot;[a-zA-Z0-9 ]&amp;quot; | wc -l)&amp;quot;; echo &amp;quot;$(( 100 - $(( $chars * 100 / ${#1} )) )) $1&amp;quot;' _ {} | sort -nrk 1 | less&lt;br /&gt;
&lt;br /&gt;
Outputs your bash_history, ordered by relative gibberishness. This was copied by hand from desktop to mobile, might well have a few typos.--[[Special:Contributions/162.158.90.208|162.158.90.208]] 10:04, 3 February 2016 (UTC)&lt;br /&gt;
::Besides the fact that -d is a GNU extension to xargs (so it won't exist on OS X, FreeBSD, or anything else but Linux), this is a weird way to calculate gibberishness; I'm guessing functions, variable substitutions, .. and ./, etc. are going to swamp the more unreadable grep and the like. Plus, I think you need a uniq in there somewhere; otherwise, aren't the first few pages are all going to be filled with the 78 copies of &amp;quot;422 cd ..&amp;quot; that tied for most gibberishy in my last 500 commands? --[[Special:Contributions/162.158.255.82|162.158.255.82]] 22:51, 7 March 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
The problem in the comic is not with regexes per se but with situations when the entered text or expression passes through several interpreters, like bash -&amp;gt; grep/sed/awk, or program text -&amp;gt; external shell command. In such cases, you have to escape backslashes for each program in the sequence, and it gets worse if you have 'real' backslashes in the final text that you're processing with the utilities (Windows' file paths, for example). See https://en.wikipedia.org/wiki/Leaning_toothpick_syndrome.&lt;br /&gt;
Feel free to lift this to the explanation page, since I'm not good at longer and more careful explanations than this one.&lt;br /&gt;
Also, gotta notice that Feedly stripped paired backslashes in the title text (probably passed it through some 'interpreter' embedded in its scripts). [[User:Aasasd|Aasasd]] ([[User talk:Aasasd|talk]]) 10:13, 3 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
:A funny comment about the MediaWiki software, which is even worse than this comic: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;Nikerabbit&amp;gt; I looked the code for rlike and didn't find where it does this. Can you point me to it? &amp;lt;vvv&amp;gt; $pattern = preg_replace( '!(\\\\\\\\\\\\\\\\)*(\\\\\\\\)?/!', '$1\\/', $pattern ); &amp;lt;Nikerabbit&amp;gt; I thought that was ascii art :)&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; ([https://phabricator.wikimedia.org/P110$275 source]) --[[Special:Contributions/162.158.91.215|162.158.91.215]] 10:18, 3 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
Interestingly, I first looked at this on my phone (using &amp;lt;strike&amp;gt;Chrome&amp;lt;/strike&amp;gt; Feedly for Android), but the title text did not display correctly in that the backslashes didn't appear (which was a little confusing!). In Chrome on my Windows desktop, the title text appeared correctly. [[User:Jdluk|Jdluk]] ([[User talk:Jdluk|talk]]) 11:36, 3 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
enough with the harry potter fancruft. &amp;quot;elder&amp;quot; is a [[Wiktionary:elder|perfectly good word]]. just because you came across it for the first time in harry potter means you are *typing carefully* the kind of person that likes harry potter. unless this is a ''harry potter reference'' wiki, of course. in which case i'll prepare a complete list of every word that appears both here and there and put a list on every page. oh, right, no i won't. --[[Special:Contributions/141.101.106.161|141.101.106.161]] 12:41, 3 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
Remember that &amp;quot;Elder&amp;quot; is used in a lot of RPGs to denote high level enemies or items. I feel like that's what Randall's referring to here, more than Harry Potter or the general sense of the term &amp;quot;Elder.&amp;quot; {{unsigned ip|108.162.245.156}}&lt;br /&gt;
: +1. Between the fact that harry potter (, ages, or tribes) aren't mentioned anywhere else in the text and the comic being a progressive list, I see this being the most likely explanation. Plus the metion of demons, which are easily the most* common usage of the modifier.&lt;br /&gt;
:: (*) or second most, after &amp;quot;elder gods&amp;quot;, who are, let's face it, also demons. [[Special:Contributions/162.158.180.125|162.158.180.125]] 14:41, 3 February 2016 (UTC)&lt;br /&gt;
::: I'm pretty sure that &amp;quot;Elder backslash&amp;quot; is in reference to the &amp;quot;Elder gods&amp;quot; of Lovecraft. [[Special:Contributions/173.245.54.35|173.245.54.35]] 16:51, 3 February 2016 (UTC)&lt;br /&gt;
:::: Note also that it's called 'The Elder Wand' not as an intensifier, as in this comic and the other examples given, but because it is literally ''made from the wood of an [https://en.wikipedia.org/wiki/Sambucus_nigra Elder Tree]'' I'm pretty sure it's not an intentional reference. -Graptor [[Special:Contributions/173.245.54.23|173.245.54.23]] 19:29, 3 February 2016 (UTC)&lt;br /&gt;
::::: If it's an intentional reference to anything, it's to Lovecraft (or to something similar). I suspect the Elder Wand was an intentional pun by Rowling, however. --[[Special:Contributions/162.158.180.137|162.158.180.137]] 04:16, 4 February 2016 (UTC)&lt;br /&gt;
::::: Since no-one else seemed to want to, I just restructured that paragraph to make it more clear that if anything Harry Potter was inspired by the older examples, not the other way around. Expanded the LOTR reference and added DnD. If anything Randall is likely to be referencing either the Lovecraft references, or the concept of Elder in general. [[Special:Contributions/141.101.64.173|141.101.64.173]] 11:50, 4 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
Attempting to add to the discussion: This regex is not necessarily invalid or incomprehensible.  (''Note: The regex changed after initial publication. See '''Changed Regex''' below.'') It looks like he was looking for a line with a regular expression or definitely some code.  You just have to work your way through the backslashes.  Although it might be invalid depending on the precise rules.  He has some unescaped closing brackets and closing parenthesis.  If these have to always be escaped then the regex is invalid.  If however you  don't have to escape a closing bracket with no opening bracket, then things are fine.  I'm not familiar enough with grep's regex parser to know how it handles that edge case.  Presuming those unescaped paren and brackets are fine, his regex searches for:&lt;br /&gt;
&lt;br /&gt;
1. A backslash&lt;br /&gt;
&lt;br /&gt;
2. An opening bracket&lt;br /&gt;
&lt;br /&gt;
3. An opening parenthesis (this is a character set but the only character in it is an opening paren)&lt;br /&gt;
&lt;br /&gt;
4. Any number of any characters&lt;br /&gt;
&lt;br /&gt;
5. A backslash&lt;br /&gt;
&lt;br /&gt;
6. An opening bracket&lt;br /&gt;
&lt;br /&gt;
7. A closing bracket&lt;br /&gt;
&lt;br /&gt;
8. A closing paren (presuming it doesn't have to be escaped when there is no opening paren)&lt;br /&gt;
&lt;br /&gt;
9. A closing bracket (presuming it doesn't have to be escaped when there is no opening bracket)&lt;br /&gt;
&lt;br /&gt;
10. Any number of character that are not a closing paren or closing bracket&lt;br /&gt;
&lt;br /&gt;
11. The end of the line&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Basically he is looking for a string that looks like:&lt;br /&gt;
&lt;br /&gt;
\[(AAAAA\[])]AAAAA&lt;br /&gt;
&lt;br /&gt;
Looks like a regex to me, and it looks like this regex also doesn't escape closing paren/brackets that don't have an opening paren/bracket, so I'm guessing that he knows what he is doing and his regex is fine.  Maybe he was playing regex golf?&lt;br /&gt;
[[User:Cmancone|Cmancone]] ([[User talk:Cmancone|talk]])cmancone&lt;br /&gt;
&lt;br /&gt;
Ninjaed by Cmancone, above. I agree with that result in every respect except for the start-of-string being potentially anything, but putting my own analysis in here because it took long enough to type!&lt;br /&gt;
&lt;br /&gt;
Depth-of-backslash might depend upon depth of utility. In Perl, &amp;lt;nowiki&amp;gt;''&amp;lt;/nowiki&amp;gt;-quotes (among others) treat everything within as literal whilst &amp;quot;&amp;quot;-quotes (and variations) interpolates any special characters, variables, etc that you put in it.  (Search for &amp;quot;Quote and Quote-like operators&amp;quot; in your favourite PerlDocs source.)  '\sss' is a literal backslash followed by three 's' characters , while &amp;quot;\sss&amp;quot; is the special \s escape (a whitespace) followed by two further regular characters.  You might need to define the first when you need to use it to provide a not-previously-escaped \s so that it might be escaped within another context.  ''Or'' you define it as &amp;quot;\\sss&amp;quot; (escaped-\) the first time, as equivalent to '\sss'.  But '\\sss' would be a literal that, later, could be interpreted as an escaped-\ to the input of a further context where the \s finally becomes 'match a whitespace'.&lt;br /&gt;
 &lt;br /&gt;
'\\\sss' would be literal, whilst &amp;quot;\\\sss&amp;quot; could be equivalent to '\ ss' (literal backslash, literal space, rest of characters).  Then, instead of literal '\\sss', for some purpose, you could interpolate two escaped-backslashes &amp;quot;\\\\sss&amp;quot;... and so on.&lt;br /&gt;
 &lt;br /&gt;
Meanwhile I ''think'', just from visual inspection, &amp;quot;'''\\\[[(].*\\\[\])][^)\]]*$'''&amp;quot; in Bash should obey the interpolation rules quite nicely.  The first two characters must be a literal backslash (from the escaped-backslash) and a literal open-square bracket (again, escaped).  The next open-square and the close-square shortly after depict a character class that contains only an open-parenthesis, and could have been written as '''\('''.&lt;br /&gt;
 &lt;br /&gt;
The '''.*''' indicates zero-or-more (the asterix) instances of ''any'' character (the dot).  There is then a literal backslash (from the next '''\\''' duo) and a literal open-square (the '''\[''' pair) and close-square (the '''\]''' pair).  The ''')''' is literal and does not need escaping (as a parenthesis group had not yet been opened), as is the next ''']''' character.  To be sure, I would have written these two as the pair escapes '''\)\]''', but horses for courses...&lt;br /&gt;
 &lt;br /&gt;
Then there's another character class (the next '''[''' and the final ''']''') required zero-or-more times (the asterix) to use up all the rest of the characters to the end (the ending '''$''' character).  As there was no '''^''' character (a.k.a. caret/circumflex/etc) at the start, the match isn't bothered about what unmatched characters appear before the original '''\('''.  This character class, however, starts with a '''^''' which in this context (the very first character of a character-class definition, not somewhere where an entire match-string starts) indicates negation of the following selection, so it is all characters ''but'' those specified, which is the regular close-parenthesis and (because it needs to be contained within a '''[]''' pair) the escaped close-square.&lt;br /&gt;
 &lt;br /&gt;
So, all matching strings must start with '''\[(''', i.e. the backslash, open-square and open-paren.  They can continue with ''any'' further text, before then having a '''\[])]''', i.e. backslash, open-and-close-squares and close-paren, close-square.  After this, the match continues just as long as there are no non-closing square/classic brackets before the ending.&lt;br /&gt;
 &lt;br /&gt;
The minimum matching literal string would be '''\[(\[])]''' with longer variants being of the form '''X\[(Y\[])]Z''' where X and Y can be replaced by anything (or be absent), and Z can be replaced by anything (or absent!) ''so long as it doesn't contain possibly relevent close-brackets!''. The latter stipulation is likely because the Y (and X) ''is'' allowed to contain these characters, and for some reason you don't want to confuse the test by finding some other '''\[])]''' segment within the X/Y-zones.  (In this context, it doesn't actually seem to matter too much.  But it might do in ways I haven't spotted or just be a hang-over from a prior permutation of the test.)&lt;br /&gt;
 &lt;br /&gt;
The &amp;quot;grep -o&amp;quot; function is working on the output to the file being '''cat'''ed (there are alternate ways of doing this that some people might prefer), to only accept the lines in the file that match the '''X\[(Y\[])]Z''' string.  These lines would appear to be lines of out.txt (a fairly generic name that reveals little to its original purpose) that are well-formed for some other purpose.  A safety-escaped (i.e. not to be taken literally by any simple parser) '''[]'''-grouping containing a '''()'''-group (''not'' escaped, perhaps reasonably in context) containing potentially random text followed by an empty '''[]''' pair (again, safety-escaped).  Depending on the source, the empty '''[]'''-pair could mean many things, as with the other layers.  And the lines may end with any further text.&lt;br /&gt;
 &lt;br /&gt;
The &amp;quot;out.txt&amp;quot; file might be the result of a prior Grep (string-search function) quote possibly scanning code for lines of particular importance by another pattern and dumping the results to out.txt for further perusal.  And then Randall finds the need to dig further into the first result by extracting just those already selected that all have the '''X\[(Y\[])Z]'''-ish pattern to them.&lt;br /&gt;
 &lt;br /&gt;
But I could be wrong, and that's way too long for an official explanation.&lt;br /&gt;
(Perhaps just something like the penultimate paragraph, if we're not entirely mistaken?) [[Special:Contributions/162.158.152.89|162.158.152.89]] 14:14, 3 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
The regex is supposed to be looking for (''Note: The regex changed after initial publication. See '''Changed Regex''' below.''):&lt;br /&gt;
 \\\      backslash&lt;br /&gt;
 [[(]     [ or (&lt;br /&gt;
 .*       any character (repeated 0 or more times)&lt;br /&gt;
 space    space&lt;br /&gt;
 \\\      backslash&lt;br /&gt;
 [[\])]   probably meant to match either [, ] or ). However, it's not correct, it instead matches the literal characters [)]&lt;br /&gt;
 [^)\]]*  probably meant to match any character that isn't ) or ], repeated. Instead it means one character that's not a ), and then a ] zero or more times&lt;br /&gt;
 $        end of string&lt;br /&gt;
&lt;br /&gt;
The first problem is that you're not supposed to escape ] in a [...], and it also has to be first in the grouping (unless negated with a ^) It should be [][)] or something similar.&lt;br /&gt;
&lt;br /&gt;
The second problem is the same. The last bit should be [^])]*$ and not [^)\]]*$. [[User:Khris|Khris]] ([[User talk:Khris|talk]]) 14:24, 3 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I was reading through the regex, if using grep you run into an error with an unmatched &amp;quot;)&amp;quot;.  Removing this gets a string such as \[(AAAAA\[]]AAAAA$  http://regexr.com/3cng8 [[Special:Contributions/162.158.214.230|162.158.214.230]] 14:42, 3 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The regex relies on several special cases (*surprise*). (''Note: The regex changed after initial publication. See '''Changed Regex''' below.'')&lt;br /&gt;
First: bash double-quote expansion (see [https://www.gnu.org/software/bash/manual/html_node/Double-Quotes.html#Double-Quotes]). Perhaps non-intuitively, \\\ followed by a character that \ doesn't escape is an escaped backslash followed by a literal backslash, effectively the same as \\\\ followed by that same non-escaped character.  After bash double-quote expansion, this results in:&lt;br /&gt;
&lt;br /&gt;
\\[[(].*\\[\])][^)\]]*$&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
grep interprets this as:&lt;br /&gt;
&lt;br /&gt;
# any leading non-\ characters&lt;br /&gt;
# literal backslash&lt;br /&gt;
# character class containing [ and (&lt;br /&gt;
# zero or more *any* characters&lt;br /&gt;
# another literal backslash&lt;br /&gt;
# yet another literal backslash, via a character class containing only a backslash.  Note this does not contain an escaped ], as it might appear at first glance.  See [http://www.gnu.org/software/grep/manual/html_node/Character-Classes-and-Bracket-Expressions.html]&lt;br /&gt;
# literal )&lt;br /&gt;
# literal ]&lt;br /&gt;
# character class of anything except ), \&lt;br /&gt;
# zero or more ]&lt;br /&gt;
# end of line&lt;br /&gt;
&lt;br /&gt;
Matching examples:&lt;br /&gt;
*echo 'asdf\[asdfasdf\\)]a]]]]]]' | grep -o &amp;quot;\\\[[(].*\\\[\])][^)\]]*$&amp;quot;&lt;br /&gt;
*echo '\(\\)]P' | grep -o &amp;quot;\\\[[(].*\\\[\])][^)\]]*$&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Special:Contributions/108.162.216.34|108.162.216.34]] 16:14, 3 February 2016 (UTC)rb&lt;br /&gt;
&lt;br /&gt;
One key thing to understand is that \ is not a special character when it's in a bracket expression - you can't escape characters in bracket expressions. So [^)\] simply means any character other then ) or \. Also, ( and ) are just regular characters unless they are escaped in basic regular expressions - extended regular expressions reverse this rule. {{unsigned|Kalfalfa}}&lt;br /&gt;
&lt;br /&gt;
I don't know about the regular expression in the title text, but I think the explanation is incorrect in that it starts off talking about regular expressions. Escaping backslashes is an issue with strings in programming in general. [[Special:Contributions/173.245.54.46|173.245.54.46]] 17:12, 3 February 2016 (UTC)&lt;br /&gt;
----&lt;br /&gt;
I suspect that Randall may have used the regexp in the title text to *find* malformed regular expressions in a file (out.txt) that he (or someone) had previously filled with output from some error message (or collection of error messages, or at least the output of something where a regular expression had been expected to work but had not worked as expected). [[Special:Contributions/162.158.252.227|162.158.252.227]] 19:06, 3 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
You can use metacharacters in character classes, the only metacharacters in a character class that must be escaped are the closing square bracket (]), the backslash (\), the hyphen, and the carat and hyphen (^) if they are the first listed item in the set. The closing square bracket requires escaping because including it without would signal the end of the set otherwise, which then means the backslash must also be escaped. The hyphen must be escaped because, without it, it signals a range (unless it is listed first, then it is literal without escaping). Carat when listed first because otherwise it signals a negative set.&amp;lt;br&amp;gt;&lt;br /&gt;
Therefore, the end of the title text regex matches a backslash followed by either ] or ), which is then followed by any number (including none) of characters so long as they are not ] nor ) which means the whole regex can match &amp;quot;&amp;lt;span style=&amp;quot;color:#040;&amp;quot;&amp;gt;\[something\] more&amp;lt;/span&amp;gt;&amp;quot; or &amp;quot;&amp;lt;span style=&amp;quot;color:#040;&amp;quot;&amp;gt;\(something\)more&amp;lt;/span&amp;gt;&amp;quot; or &amp;quot;&amp;lt;span style=&amp;quot;color:#040;&amp;quot;&amp;gt;\[something\) more&amp;lt;/span&amp;gt;&amp;quot; as well as &amp;quot;&amp;lt;span style=&amp;quot;color:#040;&amp;quot;&amp;gt;\[something\]&amp;lt;/span&amp;gt;&amp;quot;. — [[Special:Contributions/162.158.255.117|162.158.255.117]] 01:16, 4 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
I'll add that I use an ''almost identical'' regex in my mail server for matching mailing-list subject lines which often have a format of &amp;quot;&amp;lt;span style=&amp;quot;color:#040;&amp;quot;&amp;gt;[Listname] normal subject line&amp;lt;/span&amp;gt;&amp;quot; which made it pretty recognizable to me. — [[Special:Contributions/162.158.255.117|162.158.255.117]] 01:24, 4 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
;Example of a match&lt;br /&gt;
''Note: The regex changed after initial publication. See '''Changed Regex''' below''&lt;br /&gt;
&lt;br /&gt;
First, the shell will do some escaping substitution. So, in order to easily read it, let's see what grep really receives:&lt;br /&gt;
&lt;br /&gt;
 $ echo &amp;quot;\\\[[(].*\\\[\])][^)\]]*$&amp;quot;&lt;br /&gt;
 \\[[(].*\\[\])][^)\]]*$&lt;br /&gt;
&lt;br /&gt;
Let's break it out:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;\\&amp;lt;/code&amp;gt; matches a &amp;lt;code&amp;gt;\&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[[(]&amp;lt;/code&amp;gt; matches either a &amp;lt;code&amp;gt;[&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.*&amp;lt;/code&amp;gt; matches any series of characters until the next match&lt;br /&gt;
* &amp;lt;code&amp;gt;\\&amp;lt;/code&amp;gt; matches a &amp;lt;code&amp;gt;\&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[\]&amp;lt;/code&amp;gt; matches a &amp;lt;code&amp;gt;\&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;)]&amp;lt;/code&amp;gt; matches &amp;lt;code&amp;gt;)]&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[^)\]&amp;lt;/code&amp;gt; matches anything but &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;\&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;]*&amp;lt;/code&amp;gt; matches any number of &amp;lt;code&amp;gt;]&amp;lt;/code&amp;gt; (including none)&lt;br /&gt;
* &amp;lt;code&amp;gt;$&amp;lt;/code&amp;gt; matches the end of the string&lt;br /&gt;
&lt;br /&gt;
So the string '''\[aaa\]\\)]a]]]]]]''' matches! {{unsigned ip|108.162.228.167}}&lt;br /&gt;
&lt;br /&gt;
...Maybe it's meant to search for all Game Grumps transcripts which make mention of the &amp;quot;[http://gamegrumps.wikia.com/wiki/Grep Grep]&amp;quot; gag? [[Special:Contributions/108.162.216.55|108.162.216.55]] 15:53, 3 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
...Wow, guys, and here I was thinking he wanted to put the cat out, when the cat didn't want to go out.... [[Special:Contributions/108.162.249.158|108.162.249.158]] 04:03, 4 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
What I think is that Randall probably ''intended'' the regex to match &amp;quot;backslash, opening round or square bracket, anything, backslash, closing round or square bracket, anything that doesn't involve closing round or square brackets&amp;quot;, since (unlike most other possibilities given) that actually looks like something one might want to search for. Whether it ''does'', in fact, match that or something else (or indeed anything at all) is another question entirely. (For all we know, it didn't work, Randall figured out it didn't, and wrote the correct thing the next line over.)&amp;lt;br&amp;gt;Unrelatedly: this comic (and the backslash proliferation in general) reminded me of the Telnet Song. --[[Special:Contributions/162.158.180.137|162.158.180.137]] 04:16, 4 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
That explanation is wrong: &amp;lt;code&amp;gt;[\]&amp;lt;/code&amp;gt; does not match a literal backslash; it would still need to be escaped inside the brackets. That backslash escapes the next character, a ], so the group doesn't end there. The actual expression there is &amp;lt;code&amp;gt;[\])]&amp;lt;/code&amp;gt;, a character group containing an escaped ] and a ). Just like the first part. It is most likely intended to catch content surrounded by [ ] or ( ). [[Special:Contributions/141.101.104.15|141.101.104.15]] 13:43, 4 February 2016 (UTC)&lt;br /&gt;
:To clarify: this makes the expression catch anything that starts with a block surrounded by escaped round or square brackets. So stuff like '''\(Hello world\)more text here''' but with either round or square brackets (or combinations, since there's nothing enforcing they have to match. I'd have made it an OR case with two groups with matching brackets, personally) -[[Special:Contributions/141.101.104.15|141.101.104.15]] 13:51, 4 February 2016 (UTC)&lt;br /&gt;
:You're making the same mistake Randall did: while many (most?) regex dialects use \ as escape inside a character class, this is not true for grep's default syntax. I've expanded that interpretation in my comment below, however the analysis by 108.162.228.167 is a correct explanation of how this expression is ''actually'' interpreted by grep. --[[Special:Contributions/141.101.75.185|141.101.75.185]] 15:42, 4 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
Your analysis is thorough and correct, however it is unlikely this is what the regex was intended to accomplish. (''Note: The regex changed after initial publication. See '''Changed Regex''' below.'') More likely, Randall is more accustomed to other regex dialects such as Perl(-compatible) regex where a backslash ''does'' work to escape special characters inside a character class.  Under that assumption the regex (with some whitespace inserted for readability) would break up as:&lt;br /&gt;
* &amp;lt;code&amp;gt;\\ [[(]&amp;lt;/code&amp;gt; an escaped opening bracket or paren&lt;br /&gt;
* &amp;lt;code&amp;gt;.*&amp;lt;/code&amp;gt; anything&lt;br /&gt;
* &amp;lt;code&amp;gt;\\ [\])]&amp;lt;/code&amp;gt; an escaped closing bracket or paren&lt;br /&gt;
* &amp;lt;code&amp;gt;[^)\]]* $&amp;lt;/code&amp;gt; no closing bracket or paren occurring on the remainder of the line&lt;br /&gt;
Although the final condition is still a bit obscure, this still makes a ''lot'' more sense. Unfortunately it also crushes Randall's hope the regex worked as intended, since this simply isn't how the expression is parsed with grep's default syntax (which is why I always use &amp;lt;code&amp;gt;grep -P&amp;lt;/code&amp;gt;). --[[Special:Contributions/141.101.75.185|141.101.75.185]] 15:34, 4 February 2016 (UTC)&lt;br /&gt;
----&lt;br /&gt;
Did anyone notice the [https://en.wikipedia.org/wiki/Cat_%28Unix%29#Useless_use_of_cat Useless Use of Cat]? [[Special:Contributions/141.101.106.101|141.101.106.101]] 19:36, 4 February 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Yup - I hereby award Randall with the Useless Use of Cat Award of the day. Cherish it.&lt;br /&gt;
:[[User:Zedn00|Zedn00]] ([[User talk:Zedn00|talk]]) 03:51, 5 February 2016 (UTC) Zedn00&lt;br /&gt;
----&lt;br /&gt;
;Changed Regex&lt;br /&gt;
At some point before 2016-02-09 18:00 +0100, Randall has modified the bash command in the title text!&lt;br /&gt;
&lt;br /&gt;
Original command:&lt;br /&gt;
 cat out.txt | grep -o &amp;quot;\\\[[(].*\\\[\])][^)\]]*$&amp;quot;&lt;br /&gt;
New command:&lt;br /&gt;
 cat out.txt | grep -o &amp;quot;[[(].*[])][^)]]*$&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For the old command, 108.162.228.167's and 108.162.216.34's explanations above were correct.&lt;br /&gt;
&lt;br /&gt;
The new command matches:&lt;br /&gt;
 [[(]  either a '[' or a '('&lt;br /&gt;
 .*    an unbounded and possibly empty sequence of arbitrary characters&lt;br /&gt;
 [])]  either a ']' or a ')'&lt;br /&gt;
 [^)]  any character except for a ')'&lt;br /&gt;
 ]*    an unbounded and possibly empty sequence of ']'&lt;br /&gt;
 $     anchored at end of line&lt;br /&gt;
&lt;br /&gt;
It now e.g. matches '''123[abc.&amp;lt;&amp;gt;)x]]]]]''':&lt;br /&gt;
 $ echo &amp;quot;123[abc.&amp;lt;&amp;gt;)x]]]]]&amp;quot; | tee /dev/stderr | grep -o &amp;quot;[[(].*[])][^)]]*$&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This makes hardly more sense than the original command.&lt;br /&gt;
--[[User:Markus|Markus]] ([[User talk:Markus|talk]]) 17:38, 9 February 2016 (UTC)&lt;br /&gt;
----&lt;br /&gt;
Funny enough, I'm literally looking at some other dev's code right now that actually implements an eight backslash regex sequence, with just the comment &amp;quot;backslash&amp;quot;. I'm still scratching my head over what they were trying to accomplish or even communicate with this. [[User:Domino|Domino]] ([[User talk:Domino|talk]]) 21:45, 16 August 2016 (UTC)domino&lt;br /&gt;
----&lt;br /&gt;
I believe the regex is a reference to xkcd 1313 (Regex Golf)&lt;br /&gt;
[[Special:Contributions/108.162.221.90|108.162.221.90]] 16:08, 26 August 2016 (UTC)&lt;/div&gt;</summary>
		<author><name>Jgro</name></author>	</entry>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=657:_Movie_Narrative_Charts&amp;diff=138938</id>
		<title>657: Movie Narrative Charts</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=657:_Movie_Narrative_Charts&amp;diff=138938"/>
				<updated>2017-04-19T02:36:59Z</updated>
		
		<summary type="html">&lt;p&gt;Jgro: Replace Minard graphic with smaller version since image resizing is broken&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{comic&lt;br /&gt;
| number    = 657&lt;br /&gt;
| date      = November 2, 2009&lt;br /&gt;
| title     = Movie Narrative Charts&lt;br /&gt;
| image     = movie_narrative_charts.png&lt;br /&gt;
| titletext = In the LotR map, up and down correspond LOOSELY to northwest and southeast respectively.&lt;br /&gt;
}}&lt;br /&gt;
*A [http://xkcd.com/657/large/ larger version] of this image can be found by clicking the image at xkcd.com - the comic's page can also be accessed by clicking on the comic number above.&lt;br /&gt;
&lt;br /&gt;
==Explanation==&lt;br /&gt;
&lt;br /&gt;
These charts show movie character interactions. The horizontal axis is time. The vertical grouping of the lines indicates which characters are together at a given time.&lt;br /&gt;
&lt;br /&gt;
=== {{w|Lord_of_the_Rings_film_trilogy|''Lord of the Rings'' Trilogy}} ===&lt;br /&gt;
A mass of colored lines weaves back and forth across the chart, representing various characters. Sauron is represented by a red bar at the bottom contained within a huge black bar with branches, that in turn represents his army of nazgul, orcs, etc. Major locations (Moria) and plot points (the breaking of the fellowship) are marked. Gandalf, especially at the beginning, jumps all over the map in a short time. Eagles appear and then disappear a couple of times. Treebeard's line is flat except for the march to Isengard. At the end, the ship to the West drifts off into a corner. The hobbits start off in the top left with Frodo, Sam, Merry, and Pippin with Bilbo with them for a short time because of the party at the beginning.  They go off on their adventure and briefly encounter Gandalf.  They are then split up for a short time but meet back up at Weathertop when the Nazgul attack and they meet Aragorn (Strider at that point). They meet up with the rest of what becomes the fellowship of the ring at the council of Elrond at Rivendell. The newly formed fellowship must then venture into the mines of Moria which is referenced in comic [https://xkcd.com/760/ #760] and comic [https://xkcd.com/1218/ #1218]. After encountering the Balrog and the later death of Boromir the fellowship splits up. Frodo and Sam take the ring and go off on their own to destroy it and sneak into Mordor with the help of Gollum. Merry and Pippin are captured by the Uruk-hai but are rescued by Eomer and his army. Eomer and his army then briefly reunite with Legolas, Gimli, and Aragorn while Merry and Pippin find Treebeard and flood Isengard. While Merry, Pippin and Treebeard are flooding Isengard Aragorn, Gimli, and Legolas fight at Helm's Deep with Gandalf and Eomer and Theoden.  Aragorn, Gimli, and Legolas go to wake the army of the dead while Pippin goes with Gandalf and Merry goes with the Rohirrim.  All of these people rejoin for the battle of the Pelennor fields where Eowyn kills the witch king after Theoden dies along with Denethor.  The orcs, men and oliphants are all destroyed and Aragorn releases the army of the dead.  All the surviving members of that battle go to the Black Gate except Eowyn and Faramir.  Sam and Frodo destroy the Ring, Gollum dies and everyone who is still alive is there for Aragorn's coronation. Everyone goes back to their respective homes except for Frodo, Gandalf, Elrond, Galadriel, and Bilbo who get on a ship to the west.&lt;br /&gt;
&lt;br /&gt;
As the title text points out, most of the plot of The Lord of The Rings occurs on a rough northwest to southeast axis, with the Fellowship of the Ring traveling from the Shire near the top of chart to Modor at the bottom of the chart (and back again.)  The most significant exception to the northwest-southeast axis is the area of the chart between &amp;quot;The Breaking of the Fellowship&amp;quot; and &amp;quot;Isengard Flooded.&amp;quot;  Helm's Deep and Isengard are southwest from the overall northwest-southeast axis of the movies.&lt;br /&gt;
&lt;br /&gt;
=== {{w|Star_Wars|''Star Wars'' (original Trilogy)}}  ===&lt;br /&gt;
Luke, mostly accompanied by R2-D2, joins and parts from other sets of characters. There's a dotted alternative path on Jabba's line for the special edition. A dark line representing Vader, travels through the duel where he kills Obi-Wan and proceeds to the Death Star to meet with the main charcters for the first time. Vader travels to Hoth where all the characters escape and goes to Cloud City where Han is frozen. He then duels Luke before going for a long time alone and confronts Luke for a short time before taking him to the Death Star II where the climatic duel happens and he is killed. Leia at first with C-3PO is captured and placed on the Death Star before being rescued and proceeds to Hoth, Cloud City, the Sail Barge and finally to the Battle of Endor before reuniting with all the survivors. R2D2 and C-3PO are mostly together save for when Luke is attacking the Death Star and Luke's Jedi training. Luke's line swerves through most of the scenes, breaking away from the other characters during the Jedi Training, the duel on Cloud City and the duel on the Death Star II. Han and Chewie are always together as they go through all the scenes. Greedo, Lando and Boba all appear at there respictive scenes. Yoda appears about halfway through (where Luke's Jedi training is marked). All the surviving lines group up at Endor except for Vader, the Emperor, Luke, and Lando; after the climactic duel, the latter two join the rest.&lt;br /&gt;
&lt;br /&gt;
=== {{w|Jurassic_Park_(film)|''Jurassic Park''}} ===&lt;br /&gt;
The human characters are in black; dinosaurs are in red. Dilophosaurus appears briefly to eat Nedry and then fades out again. the T-Rex appears at the start and swoops down on the cars and eats Gennaro. It then weaves out until the end where it eats the raptors. The three raptors are together at the beginning, but split up about halfway through. One has a dotted portion of line between &amp;quot;locked up&amp;quot; and &amp;quot;escapes.&amp;quot; In the meantime, they cut off the lines of Arnold and Muldoon. Malcolm, Grant, Sattler, Hammond and the kids all weave in and out of their respective scenes. The raptor lines all end when t-rex's swoops down to meet them at the end, and all the surviving humans leave together.&lt;br /&gt;
&lt;br /&gt;
=== {{w|12 Angry Men (1957 film)|''12 Angry Men''}} === &lt;br /&gt;
This is a very famous trial film that tells the story of a jury made up of 12 men as they deliberate the guilt or acquittal of a defendant on the basis of reasonable doubt. Only one of these angry men believe the defendant may be innocent and he argues this against the other 11, eventually convincing them that there is reasonable doubt in the case.&lt;br /&gt;
&lt;br /&gt;
The lines are labeled Juror 1 through Juror 12. They are all perfectly horizontal and parallel.&lt;br /&gt;
&lt;br /&gt;
The joke in the 12 Angry Men graphic is that in the movie all 12 jurors (the angry men) are in the same room for the entire duration of the movie. They never move and they all always interact with each other, hence their lines stay straight and close to each other.&lt;br /&gt;
&lt;br /&gt;
This is actually not entirely true. The movie begins in the court room; a couple of times during the proceedings, a few jurors go into the washroom and have a brief discussion there; and finally, in the very last scene, two jurors have a brief exchange in front of the courthouse. In fact, this chart would actually become a useful reference to the film if each of the jury's votes sessions was shaded as battles/events, and each juror's vote shown on their line, tracking when each juror's vote switches from 'guilty' to 'not guilty'. But as far as the characters' locations, there is no need for such a narrative chart, and that is the joke.&lt;br /&gt;
&lt;br /&gt;
=== {{w|Primer_(film)|''Primer''}} ===&lt;br /&gt;
The last box is a movie called Primer from 2004, which became a cult classic.  It is about a group of engineers who discover a way to travel through time, but only in one direction (backwards) and only at the speed of regular time (i.e. you have to stay in the time machine for one hour to move an hour back in time). Because of this, the story ends up having multiple versions of the same person existing at the same time; the plot and time-travel mechanics are notoriously hard to follow, so that it is almost impossible to figure out where each character is at one time, as the comic illustrates.&lt;br /&gt;
Three lines start on the left labeled Abe, Aaron, and Granger. They enter a mass of scribbling. Somewhere vaguely towards the end, three lines emerge and fade out, all labeled with question marks.&lt;br /&gt;
The chart for ''Primer'' is referenced in the title text of the fourth image in the [[what if?]] ''{{what if|101|Plastic Dinosaurs}}''.&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
[[File:Minard.png|Napoleon's March by Minard]]&lt;br /&gt;
&lt;br /&gt;
These charts are a reference to &amp;quot;''[https://commons.wikimedia.org/wiki/File:Minard.png Napoleon's March]''&amp;quot; the map and statistical infographic by cartographic pioneer&lt;br /&gt;
{{w|Charles Joseph Minard}}; it details the movements and losses of Napoleon's troops on his failed conquest of Russia.  The size of Napoleon's army is represented by black, tapering streams similar to the design used for Sauron's and Saurman's troops in the LotR Chart. Minard's chart is extensively discussed by {{w|Edward Tufte}} in his book ''The Visual Display of Quantitative Information'', and he summarizes some of that [https://www.edwardtufte.com/tufte/minard on his website].&lt;br /&gt;
&lt;br /&gt;
==Transcript==&lt;br /&gt;
&lt;br /&gt;
[colors given approximately in HEX at first appearance]&lt;br /&gt;
&lt;br /&gt;
These charts show movie character interactions.&lt;br /&gt;
The horizontal axis is time. The vertical grouping of the&lt;br /&gt;
lines indicate which characters are together at a given time.&lt;br /&gt;
&lt;br /&gt;
=== Lord of the Rings ===&lt;br /&gt;
&lt;br /&gt;
Lord of the Rings&lt;br /&gt;
&lt;br /&gt;
====[Legend]====&lt;br /&gt;
[yellow line (fff500)] ring&lt;br /&gt;
&lt;br /&gt;
[thin line, here dark green (467120)] ringbearer&lt;br /&gt;
&lt;br /&gt;
[grey colored area (e9e9e9)] battle/event&lt;br /&gt;
&lt;br /&gt;
[line ending with a dot, here black] death&lt;br /&gt;
&lt;br /&gt;
[bar, here light brown (daccae)] army&lt;br /&gt;
&lt;br /&gt;
[line, here brown (9d7929), in a bar, here light brown] character leading army&lt;br /&gt;
&lt;br /&gt;
[grey line (b7bfb6)] wizards&lt;br /&gt;
&lt;br /&gt;
[brown line (9d7929)] men&lt;br /&gt;
&lt;br /&gt;
[blue line (4a89a8)] elves&lt;br /&gt;
&lt;br /&gt;
[dark brown line (6c411b)] dwarves &lt;br /&gt;
&lt;br /&gt;
[dark turquoise line, 143035] ents&lt;br /&gt;
&lt;br /&gt;
[green line (4e7629)] hobbits&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''[signs and colors not explained by the legend]''' &lt;br /&gt;
*[line starting / ending with a little sun means appearance / disappearance]&lt;br /&gt;
*[dark grey line (Eagles)]&lt;br /&gt;
&lt;br /&gt;
====[Entering and leaving of characters] ====&lt;br /&gt;
&lt;br /&gt;
'''[Characters entering the chart on the left, from top to bottom]'''&lt;br /&gt;
*Merry [green line]&lt;br /&gt;
*Pippin [green line]&lt;br /&gt;
*Sam [green line]&lt;br /&gt;
*Frodo [green line]&lt;br /&gt;
*Bilbo [green line]&lt;br /&gt;
*Gandalf [grey line, disappearance and reappearance marked by the sun-symbol]&lt;br /&gt;
*Arwen [blue line]&lt;br /&gt;
*Elrond [blue line]&lt;br /&gt;
*Galadriel [blue line]&lt;br /&gt;
*Saruman [grey line]&lt;br /&gt;
*Wormtongue [brown line]&lt;br /&gt;
*Éomer [brown line]&lt;br /&gt;
*Théoden [brown on light brown bar]&lt;br /&gt;
*Éowyn [brown line]&lt;br /&gt;
*Boromir [brown line on light brown bar]&lt;br /&gt;
*Denethor [brown line on light brown bar]&lt;br /&gt;
*Faramir [brown line]&lt;br /&gt;
*Sauron [red line (a23939) on black bar]&lt;br /&gt;
&lt;br /&gt;
'''[Characters leaving the chart on the right side, from top to bottom]'''&lt;br /&gt;
&lt;br /&gt;
[The five characters leaving off the top border of the chart] &lt;br /&gt;
&lt;br /&gt;
*Frodo&lt;br /&gt;
*Gandalf&lt;br /&gt;
*Bilbo&lt;br /&gt;
*Elrond&lt;br /&gt;
*Galadriel&lt;br /&gt;
&lt;br /&gt;
[text next to the group of five] Ship to the West&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[other characters leaving on the right side]&lt;br /&gt;
&lt;br /&gt;
*Merry&lt;br /&gt;
*Pippin&lt;br /&gt;
*Sam&lt;br /&gt;
*Treebeard [dark turquoise line]&lt;br /&gt;
*Legolas [blue]&lt;br /&gt;
*Gimli [dark brown line]&lt;br /&gt;
*Éomer&lt;br /&gt;
*Arwen&lt;br /&gt;
*Aragorn [brown line]&lt;br /&gt;
*Éowyn &lt;br /&gt;
*Faramir &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''' [characters starting or leaving in the middle the chart] '''&lt;br /&gt;
*Nazgûl [black line, emerging from the black bar of Sauron's army, disappearance and reappearance marked by the sun-symbol. Second appearance splits splitting in two branches. Both end with death.]&lt;br /&gt;
*Aragorn [brown line, emerging via a dotted line]&lt;br /&gt;
*Legolas [blue line, emerging via a dotted line]&lt;br /&gt;
*Gimli [dark brown line, emerging via a dotted line]&lt;br /&gt;
*Eagles [dark grey line (808080), emerging and vanishing twice via a dotted line (second time after splitting into two branches)]&lt;br /&gt;
*Uruk-Hai [black bar, two groups emerging out of Saruman's line]&lt;br /&gt;
*Gandalf [grey line, disappearance and reappearance marked by the sun-symbol]&lt;br /&gt;
*Dead [light green bar, emerging out of nothing, lead by Aragorn, disappearance marked by the sun-symbol]&lt;br /&gt;
*Ents [grey bar, emerging out of nothing, lead by Treebeard]&lt;br /&gt;
*Men&amp;amp;Oliphaunts [black bar, emerging out of nothing]&lt;br /&gt;
*Elves [light blue bar (b3cdda), emerging near the line of Galadriel]&lt;br /&gt;
*Gollum [dark green line, emerging via a dotted line]&lt;br /&gt;
*Treebeard [dark turquoise line, emerging via a dotted line]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== [List of battles/events as displayed in the chart] ====&lt;br /&gt;
&lt;br /&gt;
*Bilbo’s party	    [joined by] Merry, Pippin, Sam, Frodo, Bilbo, Gandalf    [ring goes from Bilbo to Frodo]&lt;br /&gt;
&lt;br /&gt;
*Gandalf imprisioned              [joined by] Gandalf, Saruman, Eagles &lt;br /&gt;
&lt;br /&gt;
*Weathertop [joined by] Nazgûl, Merry, Pippin, Sam, Frodo with the ring, Aragorn |&lt;br /&gt;
&lt;br /&gt;
*Council of Elrond       [including] Merry, Pippin, Sam, Frodo with the ring, Aragorn, Bilbo, Elrond, Legolas, Gimli, Gandalf, Boromir  &lt;br /&gt;
&lt;br /&gt;
*Moria      [including] Merry, Pippin, Sam, Frodo with the ring, Aragorn, Legolas, Gimli, Gandalf [disappearance], Boromir &lt;br /&gt;
&lt;br /&gt;
*Breaking of the Fellowship      [including] Merry, Pippin, Sam, Frodo with the ring, Aragorn, Legolas, Gimli, Boromir [death], Uruk-Hai [black] &lt;br /&gt;
&lt;br /&gt;
*Hobbits escape      [including] Éomer, Merry, Pippin, Uruk-Hai [death]  &lt;br /&gt;
&lt;br /&gt;
*Helm’s Deep      [including] Éomer, Gandalf, Elves [death], Uruk-Hai [death], Aragorn, Legolas, Gimli, Théoden  &lt;br /&gt;
&lt;br /&gt;
*Isengard flooded       [including] Treebeard [with bar of ents-army in grey], Merry, Pippin, Saruman [death], Wormtongue [death]&lt;br /&gt;
&lt;br /&gt;
*Pelennor fields       [including] Aragon [with bar of Dead-army in light green (bbcbad)], Legolas, Gimli, Merry, Éomer, Éowyn, Pippin, Gandalf [with bar in light brown], Faramir, Men&amp;amp;Oliphaunts [death], Orcs [death], Nazgûl [death and disappearing], Théoden [death], Denethor [death] &lt;br /&gt;
&lt;br /&gt;
*Black gate       [including] Aragorn, Legolas, Gimli, Merry, Éomer, Pippin, Gandalf [with bar in light brown], Orcs [death], Eagles, Nazgûl [death] [this battle/event-area is joined with ring destroyed-area]&lt;br /&gt;
&lt;br /&gt;
*Ring destroyed       [including] Sam, Frodo, Gollum [death], Sauron [death], Nazgûl [death] [this battle/event-area is joined with Black Gate-area]&lt;br /&gt;
&lt;br /&gt;
*Aragorn crowned king       [including] Arwen, Elrond, Aragorn, Legolas, Gimli, Merry, Éomer [without army], Pippin, Gandalf [without army], Éomyn, Faramir, Sam, Frodo&lt;br /&gt;
&lt;br /&gt;
=== Star Wars (original triology) ===&lt;br /&gt;
&lt;br /&gt;
Star Wars (original triology)&lt;br /&gt;
&lt;br /&gt;
====[Entering and leaving of characters] ====&lt;br /&gt;
&lt;br /&gt;
'''[Characters entering the chart on the left, from top to bottom]'''&lt;br /&gt;
&lt;br /&gt;
*Vader [black line]&lt;br /&gt;
*Leia [grey line]&lt;br /&gt;
*R2-D2 [blue line]&lt;br /&gt;
*C-3P0 [yellow line]&lt;br /&gt;
*Obi-Wan [grey line]&lt;br /&gt;
*Luke [grey line]&lt;br /&gt;
*Han [grey line]&lt;br /&gt;
*Chewie [brown line]&lt;br /&gt;
*Jabba [green line]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''[Characters leaving the chart on the right side, from top to bottom]'''&lt;br /&gt;
&lt;br /&gt;
*Luke&lt;br /&gt;
*Lando [grey line]&lt;br /&gt;
*Chewie&lt;br /&gt;
*Leia&lt;br /&gt;
*R2-D2&lt;br /&gt;
*C-3PO&lt;br /&gt;
*Han&lt;br /&gt;
&lt;br /&gt;
''' [Characters starting or leaving not in battle/event-areas and not on the left/right side of the chart] '''&lt;br /&gt;
&lt;br /&gt;
*Greedo [green line]&lt;br /&gt;
*Jabba Special edition [green dotted line, marking an alternative way for Jabba that unites after a little loop with Jabba main line].&lt;br /&gt;
*Yoda [green line, death also marked on the chart but not marked in an battle/event-area]&lt;br /&gt;
*Boa Fett [green line]&lt;br /&gt;
*Empperor [black]&lt;br /&gt;
&lt;br /&gt;
==== [List of battles/events as displayed in the chart] ====&lt;br /&gt;
&lt;br /&gt;
*Leia rescued       [including] Luke, Leia, Han, Chewie, Obi-Wan, R2-D2, C-3PO  &lt;br /&gt;
&lt;br /&gt;
*Duel [first]      [including] Vader, Obi-Wan [death]  &lt;br /&gt;
&lt;br /&gt;
*Death Star      [including] Vader, Luke, R2-D2, Han, Chewie  &lt;br /&gt;
&lt;br /&gt;
*Hoth      [including] Vader, Luke, Han, R2-D2, Chewie, Leia, C-3PO  &lt;br /&gt;
&lt;br /&gt;
*Luke's entire Jedi training      [including] Yoda, Luke, R2-D2  &lt;br /&gt;
&lt;br /&gt;
*Han frozen      [including] Boba Fett, Vader, Han, Chewie, Leia, C-3PO, Lando  &lt;br /&gt;
&lt;br /&gt;
*Duel [second]      [including] Luke, Vader  &lt;br /&gt;
&lt;br /&gt;
*Sail barge      [including] Luke, Chewie, Leia, R2-D2, C-3PO, Lando, Han, Boba Fett [death], Jabba [death] &lt;br /&gt;
&lt;br /&gt;
*Endor      [including] Chewie, Leia, R2-D2, C-3PO, Han  &lt;br /&gt;
&lt;br /&gt;
*Duel [third]    [including] Emperor [death], Vader [death], Luke, Lando&lt;br /&gt;
&lt;br /&gt;
=== Jurassic Park ===&lt;br /&gt;
&lt;br /&gt;
Jurassic Park&lt;br /&gt;
&lt;br /&gt;
==== [Entering and leaving of characters] ====&lt;br /&gt;
[all dinosaurs are represented by red, all men by black lines]&lt;br /&gt;
[for dinosaurs locked up, there is a donut-sign.]&lt;br /&gt;
&lt;br /&gt;
'''[Characters entering the chart on the left, from top to bottom]'''&lt;br /&gt;
&lt;br /&gt;
*T-Rex&lt;br /&gt;
*Raptors [splitting into Raptor 1, Raptor 2 and Raptor 3 later in the chart]&lt;br /&gt;
*Malcolm&lt;br /&gt;
*Grant&lt;br /&gt;
*Sattler&lt;br /&gt;
*Gennaro&lt;br /&gt;
*Hammond&lt;br /&gt;
*Muldoon&lt;br /&gt;
*Arnold&lt;br /&gt;
*Nedry&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''[Characters leaving the chart on the right side]'''&lt;br /&gt;
&lt;br /&gt;
*T-Rex&lt;br /&gt;
*Kids [start short after the left border of the chart]&lt;br /&gt;
*Grant &lt;br /&gt;
*Sattler&lt;br /&gt;
*Malcolm&lt;br /&gt;
*Hammond&lt;br /&gt;
&lt;br /&gt;
===== [Characters starting or leaving not in events/battles and not on the left/right side of the chart] =====&lt;br /&gt;
&lt;br /&gt;
*Dilophosaurus [emerging by a dotted line, vanishing by a dotted line]&lt;br /&gt;
&lt;br /&gt;
==== [List of events as displayed in the chart] ====&lt;br /&gt;
&lt;br /&gt;
*Attack on cars     [including] T-Rex, Malcolm [serious injury marked by a sign looking like a hole], Gennaro [death], Grant, Kids &lt;br /&gt;
&lt;br /&gt;
*Must go faster       [including] T-Rex, Malcolm, Sattler, Muldoon  &lt;br /&gt;
&lt;br /&gt;
*Nedry eaten       [including] Dilophosaurus, Nedry [death]  &lt;br /&gt;
&lt;br /&gt;
*Gallimimus       [including] Grant, Kids, T-Rex&lt;br /&gt;
&lt;br /&gt;
*Shed       [including] Raptor 3, Arnold [death] &lt;br /&gt;
&lt;br /&gt;
*Clever girl       [including] Raptor 1, Muldoon [death], Raptor 2  &lt;br /&gt;
&lt;br /&gt;
*Locked up escapes       [including] Raptor 3, Sattler  [This area is only grey in the point of &amp;quot;locked up&amp;quot;, but a little further on the dotted line, the word &amp;quot;escapes&amp;quot; shows that the raptor 3 is free again. All over the entire comic, this is the only time that a description of &amp;quot;what happens&amp;quot; is given. All other labels are only titles, characters and locations and the note &amp;quot;Special edition&amp;quot; at Jabba / Star Wars, which is also a kind of meta-information.]&lt;br /&gt;
&lt;br /&gt;
*Kitchen locked up     [including] Raptor 1, Kids, Raptor 2 [marked as locked up with the donut-sign]  &lt;br /&gt;
&lt;br /&gt;
*Visitor Center      [including] T-Rex, Raptor 1 [death], Kids, Grant, Sattler, Raptor 3 [death]&lt;br /&gt;
&lt;br /&gt;
=== 12 angry men ===&lt;br /&gt;
&lt;br /&gt;
12 angry men&lt;br /&gt;
&lt;br /&gt;
==== [Entering and leaving of characters] ====&lt;br /&gt;
&lt;br /&gt;
[All lines go parallel, start and end at the borders of the chart. There are no areas of battle/event.]&lt;br /&gt;
&lt;br /&gt;
Juror 1 --------- Juror 1 ----------- Juror 1 ------------ Juror 1&lt;br /&gt;
&lt;br /&gt;
Juror 2 --------- Juror 2 ----------- Juror 2 ------------ Juror 2&lt;br /&gt;
&lt;br /&gt;
Juror 3 --------- Juror 3 ----------- Juror 3 ------------ Juror 3&lt;br /&gt;
&lt;br /&gt;
Juror 4 --------- Juror 4 ----------- Juror 4 ------------ Juror 4&lt;br /&gt;
&lt;br /&gt;
Juror 5 --------- Juror 5 ----------- Juror 5 ------------ Juror 5&lt;br /&gt;
&lt;br /&gt;
Juror 6 --------- Juror 6 ----------- Juror 6 ------------ Juror 6&lt;br /&gt;
&lt;br /&gt;
Juror 7 --------- Juror 7 ----------- Juror 7 ------------ Juror 7&lt;br /&gt;
&lt;br /&gt;
Juror 8 --------- Juror 8 ----------- Juror 8 ------------ Juror 8&lt;br /&gt;
&lt;br /&gt;
Juror 9 --------- Juror 9 ----------- Juror 9 ------------ Juror 9&lt;br /&gt;
&lt;br /&gt;
Juror 10 --------- Juror 10 ----------- Juror 10 ------------ Juror 10&lt;br /&gt;
&lt;br /&gt;
Juror 11 --------- Juror 11 ----------- Juror 11 ------------ Juror 11&lt;br /&gt;
&lt;br /&gt;
Juror 12 --------- Juror 12 ----------- Juror 12 ------------ Juror 12&lt;br /&gt;
&lt;br /&gt;
=== Primer ===&lt;br /&gt;
&lt;br /&gt;
[Three characters enter the chart on the left side, all represented by black lines]&lt;br /&gt;
*Abe&lt;br /&gt;
*Aaron&lt;br /&gt;
*Granger&lt;br /&gt;
[The lines come to a giant scribble and end up with dotted lines and question marks in the right area. One cannot see which line leads to which end.]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{comic discussion}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Comics with color]]&lt;br /&gt;
[[Category:Large drawings]]&lt;br /&gt;
[[Category:Timelines]]&lt;br /&gt;
[[Category:LOTR]]&lt;br /&gt;
[[Category:Star Wars]]&lt;br /&gt;
[[Category:Jurassic Park]]&lt;br /&gt;
[[Category:Velociraptors]]&lt;br /&gt;
[[Category:Time travel]]&lt;br /&gt;
[[Category:Fiction]]&lt;/div&gt;</summary>
		<author><name>Jgro</name></author>	</entry>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=File:Minard.png&amp;diff=138937</id>
		<title>File:Minard.png</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=File:Minard.png&amp;diff=138937"/>
				<updated>2017-04-19T02:35:42Z</updated>
		
		<summary type="html">&lt;p&gt;Jgro: Jgro uploaded a new version of &amp;amp;quot;File:Minard.png&amp;amp;quot;: Smaller version, since image resizing is not working on this wiki&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Import from https://commons.wikimedia.org/wiki/File:Minard.png&lt;br /&gt;
&lt;br /&gt;
Description 	&lt;br /&gt;
Charles Minard's 1869 chart showing the number of men in Napoleon’s 1812 Russian campaign army, their movements, as well as the temperature they encountered on the return path. Lithograph, 62 x 30 cm&lt;br /&gt;
Date 	Published November 20, 1869&lt;br /&gt;
Source 	see upload log&lt;br /&gt;
Author 	Charles Minard (1781-1870)&lt;br /&gt;
Legend&lt;br /&gt;
English: The map's French caption reads:&lt;br /&gt;
&lt;br /&gt;
Figurative Map of the successive losses in men of the French Army in the Russian campaign 1812-1813.&lt;br /&gt;
Drawn up by M. Minard, Inspector General of Bridges and Roads in retirement. Paris, November 20, 1869.&lt;br /&gt;
&lt;br /&gt;
The numbers of men present are represented by the widths of the colored zones at a rate of one millimeter for every ten-thousand men; they are further written across the zones. The red [now brown] designates the men who enter into Russia, the black those who leave it. —— The information which has served to draw up the map has been extracted from the works of M. M. Thiers, of Segur, of Fezensac, of Chambray, and the unpublished diary of Jacob, pharmacist of the army since October 28th. In order to better judge with the eye the diminution of the army, I have assumed that the troops of prince Jerome and of Marshal Davoush who had been detached at Minsk and Moghilev and have rejoined around Orcha and Vitebsk, had always marched with the army.&lt;br /&gt;
&lt;br /&gt;
The scale is shown on the center-right, in &amp;quot;lieues communes de France&amp;quot; (common French league) which is 4,444m (2.75 miles).&lt;br /&gt;
&lt;br /&gt;
The lower portion of the graph is to be read from right to left. It shows the temperature on the army's return from Russia, in degrees below freezing on the Réaumur scale. (Multiply Réaumur temperatures by 1¼ to get Celsius, e.g. −30°R = −37.5 °C) At Smolensk, the temperature was −21° Réaumur on November 14th.&lt;/div&gt;</summary>
		<author><name>Jgro</name></author>	</entry>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=657:_Movie_Narrative_Charts&amp;diff=138936</id>
		<title>657: Movie Narrative Charts</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=657:_Movie_Narrative_Charts&amp;diff=138936"/>
				<updated>2017-04-19T02:13:53Z</updated>
		
		<summary type="html">&lt;p&gt;Jgro: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{comic&lt;br /&gt;
| number    = 657&lt;br /&gt;
| date      = November 2, 2009&lt;br /&gt;
| title     = Movie Narrative Charts&lt;br /&gt;
| image     = movie_narrative_charts.png&lt;br /&gt;
| titletext = In the LotR map, up and down correspond LOOSELY to northwest and southeast respectively.&lt;br /&gt;
}}&lt;br /&gt;
*A [http://xkcd.com/657/large/ larger version] of this image can be found by clicking the image at xkcd.com - the comic's page can also be accessed by clicking on the comic number above.&lt;br /&gt;
&lt;br /&gt;
==Explanation==&lt;br /&gt;
&lt;br /&gt;
These charts show movie character interactions. The horizontal axis is time. The vertical grouping of the lines indicates which characters are together at a given time.&lt;br /&gt;
&lt;br /&gt;
=== {{w|Lord_of_the_Rings_film_trilogy|''Lord of the Rings'' Trilogy}} ===&lt;br /&gt;
A mass of colored lines weaves back and forth across the chart, representing various characters. Sauron is represented by a red bar at the bottom contained within a huge black bar with branches, that in turn represents his army of nazgul, orcs, etc. Major locations (Moria) and plot points (the breaking of the fellowship) are marked. Gandalf, especially at the beginning, jumps all over the map in a short time. Eagles appear and then disappear a couple of times. Treebeard's line is flat except for the march to Isengard. At the end, the ship to the West drifts off into a corner. The hobbits start off in the top left with Frodo, Sam, Merry, and Pippin with Bilbo with them for a short time because of the party at the beginning.  They go off on their adventure and briefly encounter Gandalf.  They are then split up for a short time but meet back up at Weathertop when the Nazgul attack and they meet Aragorn (Strider at that point). They meet up with the rest of what becomes the fellowship of the ring at the council of Elrond at Rivendell. The newly formed fellowship must then venture into the mines of Moria which is referenced in comic [https://xkcd.com/760/ #760] and comic [https://xkcd.com/1218/ #1218]. After encountering the Balrog and the later death of Boromir the fellowship splits up. Frodo and Sam take the ring and go off on their own to destroy it and sneak into Mordor with the help of Gollum. Merry and Pippin are captured by the Uruk-hai but are rescued by Eomer and his army. Eomer and his army then briefly reunite with Legolas, Gimli, and Aragorn while Merry and Pippin find Treebeard and flood Isengard. While Merry, Pippin and Treebeard are flooding Isengard Aragorn, Gimli, and Legolas fight at Helm's Deep with Gandalf and Eomer and Theoden.  Aragorn, Gimli, and Legolas go to wake the army of the dead while Pippin goes with Gandalf and Merry goes with the Rohirrim.  All of these people rejoin for the battle of the Pelennor fields where Eowyn kills the witch king after Theoden dies along with Denethor.  The orcs, men and oliphants are all destroyed and Aragorn releases the army of the dead.  All the surviving members of that battle go to the Black Gate except Eowyn and Faramir.  Sam and Frodo destroy the Ring, Gollum dies and everyone who is still alive is there for Aragorn's coronation. Everyone goes back to their respective homes except for Frodo, Gandalf, Elrond, Galadriel, and Bilbo who get on a ship to the west.&lt;br /&gt;
&lt;br /&gt;
As the title text points out, most of the plot of The Lord of The Rings occurs on a rough northwest to southeast axis, with the Fellowship of the Ring traveling from the Shire near the top of chart to Modor at the bottom of the chart (and back again.)  The most significant exception to the northwest-southeast axis is the area of the chart between &amp;quot;The Breaking of the Fellowship&amp;quot; and &amp;quot;Isengard Flooded.&amp;quot;  Helm's Deep and Isengard are southwest from the overall northwest-southeast axis of the movies.&lt;br /&gt;
&lt;br /&gt;
=== {{w|Star_Wars|''Star Wars'' (original Trilogy)}}  ===&lt;br /&gt;
Luke, mostly accompanied by R2-D2, joins and parts from other sets of characters. There's a dotted alternative path on Jabba's line for the special edition. A dark line representing Vader, travels through the duel where he kills Obi-Wan and proceeds to the Death Star to meet with the main charcters for the first time. Vader travels to Hoth where all the characters escape and goes to Cloud City where Han is frozen. He then duels Luke before going for a long time alone and confronts Luke for a short time before taking him to the Death Star II where the climatic duel happens and he is killed. Leia at first with C-3PO is captured and placed on the Death Star before being rescued and proceeds to Hoth, Cloud City, the Sail Barge and finally to the Battle of Endor before reuniting with all the survivors. R2D2 and C-3PO are mostly together save for when Luke is attacking the Death Star and Luke's Jedi training. Luke's line swerves through most of the scenes, breaking away from the other characters during the Jedi Training, the duel on Cloud City and the duel on the Death Star II. Han and Chewie are always together as they go through all the scenes. Greedo, Lando and Boba all appear at there respictive scenes. Yoda appears about halfway through (where Luke's Jedi training is marked). All the surviving lines group up at Endor except for Vader, the Emperor, Luke, and Lando; after the climactic duel, the latter two join the rest.&lt;br /&gt;
&lt;br /&gt;
=== {{w|Jurassic_Park_(film)|''Jurassic Park''}} ===&lt;br /&gt;
The human characters are in black; dinosaurs are in red. Dilophosaurus appears briefly to eat Nedry and then fades out again. the T-Rex appears at the start and swoops down on the cars and eats Gennaro. It then weaves out until the end where it eats the raptors. The three raptors are together at the beginning, but split up about halfway through. One has a dotted portion of line between &amp;quot;locked up&amp;quot; and &amp;quot;escapes.&amp;quot; In the meantime, they cut off the lines of Arnold and Muldoon. Malcolm, Grant, Sattler, Hammond and the kids all weave in and out of their respective scenes. The raptor lines all end when t-rex's swoops down to meet them at the end, and all the surviving humans leave together.&lt;br /&gt;
&lt;br /&gt;
=== {{w|12 Angry Men (1957 film)|''12 Angry Men''}} === &lt;br /&gt;
This is a very famous trial film that tells the story of a jury made up of 12 men as they deliberate the guilt or acquittal of a defendant on the basis of reasonable doubt. Only one of these angry men believe the defendant may be innocent and he argues this against the other 11, eventually convincing them that there is reasonable doubt in the case.&lt;br /&gt;
&lt;br /&gt;
The lines are labeled Juror 1 through Juror 12. They are all perfectly horizontal and parallel.&lt;br /&gt;
&lt;br /&gt;
The joke in the 12 Angry Men graphic is that in the movie all 12 jurors (the angry men) are in the same room for the entire duration of the movie. They never move and they all always interact with each other, hence their lines stay straight and close to each other.&lt;br /&gt;
&lt;br /&gt;
This is actually not entirely true. The movie begins in the court room; a couple of times during the proceedings, a few jurors go into the washroom and have a brief discussion there; and finally, in the very last scene, two jurors have a brief exchange in front of the courthouse. In fact, this chart would actually become a useful reference to the film if each of the jury's votes sessions was shaded as battles/events, and each juror's vote shown on their line, tracking when each juror's vote switches from 'guilty' to 'not guilty'. But as far as the characters' locations, there is no need for such a narrative chart, and that is the joke.&lt;br /&gt;
&lt;br /&gt;
=== {{w|Primer_(film)|''Primer''}} ===&lt;br /&gt;
The last box is a movie called Primer from 2004, which became a cult classic.  It is about a group of engineers who discover a way to travel through time, but only in one direction (backwards) and only at the speed of regular time (i.e. you have to stay in the time machine for one hour to move an hour back in time). Because of this, the story ends up having multiple versions of the same person existing at the same time; the plot and time-travel mechanics are notoriously hard to follow, so that it is almost impossible to figure out where each character is at one time, as the comic illustrates.&lt;br /&gt;
Three lines start on the left labeled Abe, Aaron, and Granger. They enter a mass of scribbling. Somewhere vaguely towards the end, three lines emerge and fade out, all labeled with question marks.&lt;br /&gt;
The chart for ''Primer'' is referenced in the title text of the fourth image in the [[what if?]] ''{{what if|101|Plastic Dinosaurs}}''.&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
[[File:Minard.png|740px|Napoleon's March by Minard]]&lt;br /&gt;
&lt;br /&gt;
These charts are a reference to &amp;quot;''[https://commons.wikimedia.org/wiki/File:Minard.png Napoleon's March]''&amp;quot; the map and statistical infographic by cartographic pioneer&lt;br /&gt;
{{w|Charles Joseph Minard}}; it details the movements and losses of Napoleon's troops on his failed conquest of Russia.  The size of Napoleon's army is represented by black, tapering streams similar to the design used for Sauron's and Saurman's troops in the LotR Chart. Minard's chart is extensively discussed by {{w|Edward Tufte}} in his book ''The Visual Display of Quantitative Information'', and he summarizes some of that [https://www.edwardtufte.com/tufte/minard on his website].&lt;br /&gt;
&lt;br /&gt;
==Transcript==&lt;br /&gt;
&lt;br /&gt;
[colors given approximately in HEX at first appearance]&lt;br /&gt;
&lt;br /&gt;
These charts show movie character interactions.&lt;br /&gt;
The horizontal axis is time. The vertical grouping of the&lt;br /&gt;
lines indicate which characters are together at a given time.&lt;br /&gt;
&lt;br /&gt;
=== Lord of the Rings ===&lt;br /&gt;
&lt;br /&gt;
Lord of the Rings&lt;br /&gt;
&lt;br /&gt;
====[Legend]====&lt;br /&gt;
[yellow line (fff500)] ring&lt;br /&gt;
&lt;br /&gt;
[thin line, here dark green (467120)] ringbearer&lt;br /&gt;
&lt;br /&gt;
[grey colored area (e9e9e9)] battle/event&lt;br /&gt;
&lt;br /&gt;
[line ending with a dot, here black] death&lt;br /&gt;
&lt;br /&gt;
[bar, here light brown (daccae)] army&lt;br /&gt;
&lt;br /&gt;
[line, here brown (9d7929), in a bar, here light brown] character leading army&lt;br /&gt;
&lt;br /&gt;
[grey line (b7bfb6)] wizards&lt;br /&gt;
&lt;br /&gt;
[brown line (9d7929)] men&lt;br /&gt;
&lt;br /&gt;
[blue line (4a89a8)] elves&lt;br /&gt;
&lt;br /&gt;
[dark brown line (6c411b)] dwarves &lt;br /&gt;
&lt;br /&gt;
[dark turquoise line, 143035] ents&lt;br /&gt;
&lt;br /&gt;
[green line (4e7629)] hobbits&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''[signs and colors not explained by the legend]''' &lt;br /&gt;
*[line starting / ending with a little sun means appearance / disappearance]&lt;br /&gt;
*[dark grey line (Eagles)]&lt;br /&gt;
&lt;br /&gt;
====[Entering and leaving of characters] ====&lt;br /&gt;
&lt;br /&gt;
'''[Characters entering the chart on the left, from top to bottom]'''&lt;br /&gt;
*Merry [green line]&lt;br /&gt;
*Pippin [green line]&lt;br /&gt;
*Sam [green line]&lt;br /&gt;
*Frodo [green line]&lt;br /&gt;
*Bilbo [green line]&lt;br /&gt;
*Gandalf [grey line, disappearance and reappearance marked by the sun-symbol]&lt;br /&gt;
*Arwen [blue line]&lt;br /&gt;
*Elrond [blue line]&lt;br /&gt;
*Galadriel [blue line]&lt;br /&gt;
*Saruman [grey line]&lt;br /&gt;
*Wormtongue [brown line]&lt;br /&gt;
*Éomer [brown line]&lt;br /&gt;
*Théoden [brown on light brown bar]&lt;br /&gt;
*Éowyn [brown line]&lt;br /&gt;
*Boromir [brown line on light brown bar]&lt;br /&gt;
*Denethor [brown line on light brown bar]&lt;br /&gt;
*Faramir [brown line]&lt;br /&gt;
*Sauron [red line (a23939) on black bar]&lt;br /&gt;
&lt;br /&gt;
'''[Characters leaving the chart on the right side, from top to bottom]'''&lt;br /&gt;
&lt;br /&gt;
[The five characters leaving off the top border of the chart] &lt;br /&gt;
&lt;br /&gt;
*Frodo&lt;br /&gt;
*Gandalf&lt;br /&gt;
*Bilbo&lt;br /&gt;
*Elrond&lt;br /&gt;
*Galadriel&lt;br /&gt;
&lt;br /&gt;
[text next to the group of five] Ship to the West&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[other characters leaving on the right side]&lt;br /&gt;
&lt;br /&gt;
*Merry&lt;br /&gt;
*Pippin&lt;br /&gt;
*Sam&lt;br /&gt;
*Treebeard [dark turquoise line]&lt;br /&gt;
*Legolas [blue]&lt;br /&gt;
*Gimli [dark brown line]&lt;br /&gt;
*Éomer&lt;br /&gt;
*Arwen&lt;br /&gt;
*Aragorn [brown line]&lt;br /&gt;
*Éowyn &lt;br /&gt;
*Faramir &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''' [characters starting or leaving in the middle the chart] '''&lt;br /&gt;
*Nazgûl [black line, emerging from the black bar of Sauron's army, disappearance and reappearance marked by the sun-symbol. Second appearance splits splitting in two branches. Both end with death.]&lt;br /&gt;
*Aragorn [brown line, emerging via a dotted line]&lt;br /&gt;
*Legolas [blue line, emerging via a dotted line]&lt;br /&gt;
*Gimli [dark brown line, emerging via a dotted line]&lt;br /&gt;
*Eagles [dark grey line (808080), emerging and vanishing twice via a dotted line (second time after splitting into two branches)]&lt;br /&gt;
*Uruk-Hai [black bar, two groups emerging out of Saruman's line]&lt;br /&gt;
*Gandalf [grey line, disappearance and reappearance marked by the sun-symbol]&lt;br /&gt;
*Dead [light green bar, emerging out of nothing, lead by Aragorn, disappearance marked by the sun-symbol]&lt;br /&gt;
*Ents [grey bar, emerging out of nothing, lead by Treebeard]&lt;br /&gt;
*Men&amp;amp;Oliphaunts [black bar, emerging out of nothing]&lt;br /&gt;
*Elves [light blue bar (b3cdda), emerging near the line of Galadriel]&lt;br /&gt;
*Gollum [dark green line, emerging via a dotted line]&lt;br /&gt;
*Treebeard [dark turquoise line, emerging via a dotted line]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== [List of battles/events as displayed in the chart] ====&lt;br /&gt;
&lt;br /&gt;
*Bilbo’s party	    [joined by] Merry, Pippin, Sam, Frodo, Bilbo, Gandalf    [ring goes from Bilbo to Frodo]&lt;br /&gt;
&lt;br /&gt;
*Gandalf imprisioned              [joined by] Gandalf, Saruman, Eagles &lt;br /&gt;
&lt;br /&gt;
*Weathertop [joined by] Nazgûl, Merry, Pippin, Sam, Frodo with the ring, Aragorn |&lt;br /&gt;
&lt;br /&gt;
*Council of Elrond       [including] Merry, Pippin, Sam, Frodo with the ring, Aragorn, Bilbo, Elrond, Legolas, Gimli, Gandalf, Boromir  &lt;br /&gt;
&lt;br /&gt;
*Moria      [including] Merry, Pippin, Sam, Frodo with the ring, Aragorn, Legolas, Gimli, Gandalf [disappearance], Boromir &lt;br /&gt;
&lt;br /&gt;
*Breaking of the Fellowship      [including] Merry, Pippin, Sam, Frodo with the ring, Aragorn, Legolas, Gimli, Boromir [death], Uruk-Hai [black] &lt;br /&gt;
&lt;br /&gt;
*Hobbits escape      [including] Éomer, Merry, Pippin, Uruk-Hai [death]  &lt;br /&gt;
&lt;br /&gt;
*Helm’s Deep      [including] Éomer, Gandalf, Elves [death], Uruk-Hai [death], Aragorn, Legolas, Gimli, Théoden  &lt;br /&gt;
&lt;br /&gt;
*Isengard flooded       [including] Treebeard [with bar of ents-army in grey], Merry, Pippin, Saruman [death], Wormtongue [death]&lt;br /&gt;
&lt;br /&gt;
*Pelennor fields       [including] Aragon [with bar of Dead-army in light green (bbcbad)], Legolas, Gimli, Merry, Éomer, Éowyn, Pippin, Gandalf [with bar in light brown], Faramir, Men&amp;amp;Oliphaunts [death], Orcs [death], Nazgûl [death and disappearing], Théoden [death], Denethor [death] &lt;br /&gt;
&lt;br /&gt;
*Black gate       [including] Aragorn, Legolas, Gimli, Merry, Éomer, Pippin, Gandalf [with bar in light brown], Orcs [death], Eagles, Nazgûl [death] [this battle/event-area is joined with ring destroyed-area]&lt;br /&gt;
&lt;br /&gt;
*Ring destroyed       [including] Sam, Frodo, Gollum [death], Sauron [death], Nazgûl [death] [this battle/event-area is joined with Black Gate-area]&lt;br /&gt;
&lt;br /&gt;
*Aragorn crowned king       [including] Arwen, Elrond, Aragorn, Legolas, Gimli, Merry, Éomer [without army], Pippin, Gandalf [without army], Éomyn, Faramir, Sam, Frodo&lt;br /&gt;
&lt;br /&gt;
=== Star Wars (original triology) ===&lt;br /&gt;
&lt;br /&gt;
Star Wars (original triology)&lt;br /&gt;
&lt;br /&gt;
====[Entering and leaving of characters] ====&lt;br /&gt;
&lt;br /&gt;
'''[Characters entering the chart on the left, from top to bottom]'''&lt;br /&gt;
&lt;br /&gt;
*Vader [black line]&lt;br /&gt;
*Leia [grey line]&lt;br /&gt;
*R2-D2 [blue line]&lt;br /&gt;
*C-3P0 [yellow line]&lt;br /&gt;
*Obi-Wan [grey line]&lt;br /&gt;
*Luke [grey line]&lt;br /&gt;
*Han [grey line]&lt;br /&gt;
*Chewie [brown line]&lt;br /&gt;
*Jabba [green line]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''[Characters leaving the chart on the right side, from top to bottom]'''&lt;br /&gt;
&lt;br /&gt;
*Luke&lt;br /&gt;
*Lando [grey line]&lt;br /&gt;
*Chewie&lt;br /&gt;
*Leia&lt;br /&gt;
*R2-D2&lt;br /&gt;
*C-3PO&lt;br /&gt;
*Han&lt;br /&gt;
&lt;br /&gt;
''' [Characters starting or leaving not in battle/event-areas and not on the left/right side of the chart] '''&lt;br /&gt;
&lt;br /&gt;
*Greedo [green line]&lt;br /&gt;
*Jabba Special edition [green dotted line, marking an alternative way for Jabba that unites after a little loop with Jabba main line].&lt;br /&gt;
*Yoda [green line, death also marked on the chart but not marked in an battle/event-area]&lt;br /&gt;
*Boa Fett [green line]&lt;br /&gt;
*Empperor [black]&lt;br /&gt;
&lt;br /&gt;
==== [List of battles/events as displayed in the chart] ====&lt;br /&gt;
&lt;br /&gt;
*Leia rescued       [including] Luke, Leia, Han, Chewie, Obi-Wan, R2-D2, C-3PO  &lt;br /&gt;
&lt;br /&gt;
*Duel [first]      [including] Vader, Obi-Wan [death]  &lt;br /&gt;
&lt;br /&gt;
*Death Star      [including] Vader, Luke, R2-D2, Han, Chewie  &lt;br /&gt;
&lt;br /&gt;
*Hoth      [including] Vader, Luke, Han, R2-D2, Chewie, Leia, C-3PO  &lt;br /&gt;
&lt;br /&gt;
*Luke's entire Jedi training      [including] Yoda, Luke, R2-D2  &lt;br /&gt;
&lt;br /&gt;
*Han frozen      [including] Boba Fett, Vader, Han, Chewie, Leia, C-3PO, Lando  &lt;br /&gt;
&lt;br /&gt;
*Duel [second]      [including] Luke, Vader  &lt;br /&gt;
&lt;br /&gt;
*Sail barge      [including] Luke, Chewie, Leia, R2-D2, C-3PO, Lando, Han, Boba Fett [death], Jabba [death] &lt;br /&gt;
&lt;br /&gt;
*Endor      [including] Chewie, Leia, R2-D2, C-3PO, Han  &lt;br /&gt;
&lt;br /&gt;
*Duel [third]    [including] Emperor [death], Vader [death], Luke, Lando&lt;br /&gt;
&lt;br /&gt;
=== Jurassic Park ===&lt;br /&gt;
&lt;br /&gt;
Jurassic Park&lt;br /&gt;
&lt;br /&gt;
==== [Entering and leaving of characters] ====&lt;br /&gt;
[all dinosaurs are represented by red, all men by black lines]&lt;br /&gt;
[for dinosaurs locked up, there is a donut-sign.]&lt;br /&gt;
&lt;br /&gt;
'''[Characters entering the chart on the left, from top to bottom]'''&lt;br /&gt;
&lt;br /&gt;
*T-Rex&lt;br /&gt;
*Raptors [splitting into Raptor 1, Raptor 2 and Raptor 3 later in the chart]&lt;br /&gt;
*Malcolm&lt;br /&gt;
*Grant&lt;br /&gt;
*Sattler&lt;br /&gt;
*Gennaro&lt;br /&gt;
*Hammond&lt;br /&gt;
*Muldoon&lt;br /&gt;
*Arnold&lt;br /&gt;
*Nedry&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''[Characters leaving the chart on the right side]'''&lt;br /&gt;
&lt;br /&gt;
*T-Rex&lt;br /&gt;
*Kids [start short after the left border of the chart]&lt;br /&gt;
*Grant &lt;br /&gt;
*Sattler&lt;br /&gt;
*Malcolm&lt;br /&gt;
*Hammond&lt;br /&gt;
&lt;br /&gt;
===== [Characters starting or leaving not in events/battles and not on the left/right side of the chart] =====&lt;br /&gt;
&lt;br /&gt;
*Dilophosaurus [emerging by a dotted line, vanishing by a dotted line]&lt;br /&gt;
&lt;br /&gt;
==== [List of events as displayed in the chart] ====&lt;br /&gt;
&lt;br /&gt;
*Attack on cars     [including] T-Rex, Malcolm [serious injury marked by a sign looking like a hole], Gennaro [death], Grant, Kids &lt;br /&gt;
&lt;br /&gt;
*Must go faster       [including] T-Rex, Malcolm, Sattler, Muldoon  &lt;br /&gt;
&lt;br /&gt;
*Nedry eaten       [including] Dilophosaurus, Nedry [death]  &lt;br /&gt;
&lt;br /&gt;
*Gallimimus       [including] Grant, Kids, T-Rex&lt;br /&gt;
&lt;br /&gt;
*Shed       [including] Raptor 3, Arnold [death] &lt;br /&gt;
&lt;br /&gt;
*Clever girl       [including] Raptor 1, Muldoon [death], Raptor 2  &lt;br /&gt;
&lt;br /&gt;
*Locked up escapes       [including] Raptor 3, Sattler  [This area is only grey in the point of &amp;quot;locked up&amp;quot;, but a little further on the dotted line, the word &amp;quot;escapes&amp;quot; shows that the raptor 3 is free again. All over the entire comic, this is the only time that a description of &amp;quot;what happens&amp;quot; is given. All other labels are only titles, characters and locations and the note &amp;quot;Special edition&amp;quot; at Jabba / Star Wars, which is also a kind of meta-information.]&lt;br /&gt;
&lt;br /&gt;
*Kitchen locked up     [including] Raptor 1, Kids, Raptor 2 [marked as locked up with the donut-sign]  &lt;br /&gt;
&lt;br /&gt;
*Visitor Center      [including] T-Rex, Raptor 1 [death], Kids, Grant, Sattler, Raptor 3 [death]&lt;br /&gt;
&lt;br /&gt;
=== 12 angry men ===&lt;br /&gt;
&lt;br /&gt;
12 angry men&lt;br /&gt;
&lt;br /&gt;
==== [Entering and leaving of characters] ====&lt;br /&gt;
&lt;br /&gt;
[All lines go parallel, start and end at the borders of the chart. There are no areas of battle/event.]&lt;br /&gt;
&lt;br /&gt;
Juror 1 --------- Juror 1 ----------- Juror 1 ------------ Juror 1&lt;br /&gt;
&lt;br /&gt;
Juror 2 --------- Juror 2 ----------- Juror 2 ------------ Juror 2&lt;br /&gt;
&lt;br /&gt;
Juror 3 --------- Juror 3 ----------- Juror 3 ------------ Juror 3&lt;br /&gt;
&lt;br /&gt;
Juror 4 --------- Juror 4 ----------- Juror 4 ------------ Juror 4&lt;br /&gt;
&lt;br /&gt;
Juror 5 --------- Juror 5 ----------- Juror 5 ------------ Juror 5&lt;br /&gt;
&lt;br /&gt;
Juror 6 --------- Juror 6 ----------- Juror 6 ------------ Juror 6&lt;br /&gt;
&lt;br /&gt;
Juror 7 --------- Juror 7 ----------- Juror 7 ------------ Juror 7&lt;br /&gt;
&lt;br /&gt;
Juror 8 --------- Juror 8 ----------- Juror 8 ------------ Juror 8&lt;br /&gt;
&lt;br /&gt;
Juror 9 --------- Juror 9 ----------- Juror 9 ------------ Juror 9&lt;br /&gt;
&lt;br /&gt;
Juror 10 --------- Juror 10 ----------- Juror 10 ------------ Juror 10&lt;br /&gt;
&lt;br /&gt;
Juror 11 --------- Juror 11 ----------- Juror 11 ------------ Juror 11&lt;br /&gt;
&lt;br /&gt;
Juror 12 --------- Juror 12 ----------- Juror 12 ------------ Juror 12&lt;br /&gt;
&lt;br /&gt;
=== Primer ===&lt;br /&gt;
&lt;br /&gt;
[Three characters enter the chart on the left side, all represented by black lines]&lt;br /&gt;
*Abe&lt;br /&gt;
*Aaron&lt;br /&gt;
*Granger&lt;br /&gt;
[The lines come to a giant scribble and end up with dotted lines and question marks in the right area. One cannot see which line leads to which end.]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{comic discussion}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Comics with color]]&lt;br /&gt;
[[Category:Large drawings]]&lt;br /&gt;
[[Category:Timelines]]&lt;br /&gt;
[[Category:LOTR]]&lt;br /&gt;
[[Category:Star Wars]]&lt;br /&gt;
[[Category:Jurassic Park]]&lt;br /&gt;
[[Category:Velociraptors]]&lt;br /&gt;
[[Category:Time travel]]&lt;br /&gt;
[[Category:Fiction]]&lt;/div&gt;</summary>
		<author><name>Jgro</name></author>	</entry>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=1047:_Approximations&amp;diff=28855</id>
		<title>1047: Approximations</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=1047:_Approximations&amp;diff=28855"/>
				<updated>2013-02-24T06:15:57Z</updated>
		
		<summary type="html">&lt;p&gt;Jgro: /* Explanation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{comic&lt;br /&gt;
| number    = 1047&lt;br /&gt;
| date      = April 25, 2012&lt;br /&gt;
| title     = Approximations&lt;br /&gt;
| image     = approximations.png&lt;br /&gt;
| titletext = Two tips: 1) 8675309 is not just prime, it's a twin prime, and 2) if you ever find yourself raising log(anything)^e or taking the pi-th root of anything, set down the marker and back away from the whiteboard; something has gone horribly wrong.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Explanation==&lt;br /&gt;
Per {{w|twin prime|wikipedia}}: A twin prime is a {{w|prime number}} that differs from another prime number by two.&lt;br /&gt;
&lt;br /&gt;
“Rent Method” refers to the song “Seasons of Love” from the musical “Rent.” The song asks, “How do you measure a year?” One line says “525,600 minutes” while most of the rest of the song suggests the best way to measure a year is moments shared with a loved one.&lt;br /&gt;
&lt;br /&gt;
Incidentally, 75^4 overstates the number of seconds in a year by 29 hours.&lt;br /&gt;
&lt;br /&gt;
Jenny’s Number = (867)-5309, “please don’t change your number on me” But since this is *explain*xkcd, let’s add that it’s from a song by Tommy Tutone: [http://www.dailymotion.com/video/x20zsk_tommy-tutone-867-5309-jenny_music]&lt;br /&gt;
&lt;br /&gt;
The complicated formula for the White House switchboard yields 0.2024561415. (202) 456-1415 was (at least during the Bush administration) the phone number for the White House switchboard.&lt;br /&gt;
&lt;br /&gt;
All these approximations actually work astonishingly well. There are re-occurring math jokes along the lines of, “3/5 + pi/(7-pi) – sqrt(2) = 0, but your calculator is probably not good enough to compute this correctly”, which are mainly used to troll geeks. Those interested in number theory may easily compute that sqrt(2) is not even algebraic in the quotient field of Z[pi], which disproves the equality.&lt;br /&gt;
&lt;br /&gt;
Furthermore, there are some useful approximations (which were even more useful in times before calculators) such as “pi is approximately equal to 22/7”.&lt;br /&gt;
&lt;br /&gt;
[[Randall]] makes fun of both of these, using rather strange approximations (honestly: you may handle 22/7, but who can calculate in a sensible way with 99^8, let alone 30^(pi^e)?) to calculate some constants that are easy enough to handle in the decimal system, and stating such “slightly wrong” trick equations, one of which *is* actually correct (which may astonish only those who are not familiar with cosines).&lt;br /&gt;
&lt;br /&gt;
Jenny’s number and the White House switchboard have already been explained. The other constants are either self-explanatory or simple physical constants that have decimal values you may google in about 1 sec. I am not going to explain what these constants mean. Three things to note: near the bottom, there is a constant which you may easily confuse for a 9. Instead, it’s a g, the standard downward acceleration due to gravity on Earth.&lt;br /&gt;
&lt;br /&gt;
Now to the accuracy values: The fine structure constant is 0.007297 something, which is approximately 1/137. Randall’s point here is that 1/137 is not a very useful approximation: Firstly, 0.007297 is input into a calculator as fast as 1/137, and it’s more accurate. Secondly, if you do not have a calculator, 1/137 earns you nothing, for 137 is a prime and therefore does not ease further computation. That’s why Randall stated he’s had enough of this crap.&lt;br /&gt;
&lt;br /&gt;
The ruby laser wavelength varies because “ruby” is not clearly defined.&lt;br /&gt;
&lt;br /&gt;
The mean earth radius varies because there is not one single way to make a sphere out of the earth. Theoretically, it should be possible to measure the distance from the center for any point on the Earth’s surface and compute the mean integral, but practically it’s not, so geodesy has defined some sets of radii to take the mean of, yielding different mean radii. If you are interested in details, ask {{w|Earth radius#Mean radii|Wikipedia}}. Randall’s value lies somewhere in between, thus actually being a possible definition for Earth’s mean radius.&lt;br /&gt;
&lt;br /&gt;
The correct equation in the &amp;quot;Pro tip - Not all of these are wrong&amp;quot; section is cos(pi/7) + cos(3pi/7) + cos(5pi/7) = 1/2 as [http://math.stackexchange.com/questions/140388/how-can-one-prove-cos-pi-7-cos3-pi-7-cos5-pi-7-1-2 shown here].&lt;br /&gt;
&lt;br /&gt;
The image text gives more or less useful information. Twin primes have always been a subject of interest, because they are comparatively rare, and because it is not yet known whether there are infinitely many of them.&lt;br /&gt;
&lt;br /&gt;
{{w|Pi}} is a natural constant that arises in describing circles or ellipses. As such, useful as it may be, it’s not supposed to occur anywhere in an exponent (unless you deal with complex numbers). Thus a sensible use of the pi-th root would be as if you found an English-speaking extraterrestrian community – not really impossible, but of such low probability that nobody would believe you.&lt;br /&gt;
&lt;br /&gt;
Same goes for the e-th power: e only appears in the basis of a power, not in the exponent.&lt;br /&gt;
&lt;br /&gt;
==Transcript==&lt;br /&gt;
A table of slightly wrong equations and identities useful for approximations and/or trolling teachers. (Found using a mix of trial-and-error, Mathematica, and Robert Munafo's Ries tool.)  All units are SI MKS unless otherwise noted.&lt;br /&gt;
&lt;br /&gt;
*Relation: One light year(m) ~= 99^8&lt;br /&gt;
Accurate to within: one part in 40&lt;br /&gt;
&lt;br /&gt;
*Relation: Earth Surface(m^2) ~= 69^8&lt;br /&gt;
Accurate to within: one part in 130&lt;br /&gt;
&lt;br /&gt;
*Relation: Ocean's volume(m^3) ~= 9^19&lt;br /&gt;
Accurate to within: one part in 70&lt;br /&gt;
&lt;br /&gt;
*Relation: Seconds in a year ~= 75^4&lt;br /&gt;
Accurate to within: one part in 400&lt;br /&gt;
&lt;br /&gt;
*Relation: Seconds in a year (rent method) ~= 525,600 x 60&lt;br /&gt;
Accurate to within: one part in 1400&lt;br /&gt;
&lt;br /&gt;
*Relation: Age of the universe (seconds) ~= 15^15&lt;br /&gt;
Accurate to within: one part in 70&lt;br /&gt;
&lt;br /&gt;
*Relation: Planck's constant ~= 1/(30^pi^e)&lt;br /&gt;
Accurate to within: one part in 110&lt;br /&gt;
&lt;br /&gt;
*Relation: Fine structure constant ~= 1/140&lt;br /&gt;
Accurate to within: [I've had enough of this 137 crap]&lt;br /&gt;
&lt;br /&gt;
*Relation: Fundamental charge ~= 3/(14 * pi^pi^pi)&lt;br /&gt;
Accurate to within: one part in 500&lt;br /&gt;
&lt;br /&gt;
*Relation: White House Switchboard ~= 1/(e^((1 + 8^(1/(e-1)))^(1/pi)))&lt;br /&gt;
&lt;br /&gt;
*Relation: Jenny's Constant ~= (7^(e/1 - 1/e) - 9) * pi^2&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Intermission: World Population Estimate which should stay current for a decade or two:&lt;br /&gt;
&lt;br /&gt;
Take the last two digits of the current year&lt;br /&gt;
&lt;br /&gt;
Example: 20[14] &lt;br /&gt;
&lt;br /&gt;
Subtract the number of leap years since hurricane Katrina&lt;br /&gt;
&lt;br /&gt;
Example:14 (minus 2008 and 2012) is 12&lt;br /&gt;
&lt;br /&gt;
Add a decimal point&lt;br /&gt;
&lt;br /&gt;
Example: 1.2&lt;br /&gt;
&lt;br /&gt;
Add 6&lt;br /&gt;
&lt;br /&gt;
Example: 6 + 1.2&lt;br /&gt;
&lt;br /&gt;
7.2 ~= World population in billions.&lt;br /&gt;
&lt;br /&gt;
Version for US population:&lt;br /&gt;
&lt;br /&gt;
Example: 20[14]&lt;br /&gt;
&lt;br /&gt;
Subtract 10&lt;br /&gt;
&lt;br /&gt;
Example: 4&lt;br /&gt;
&lt;br /&gt;
Multiply by 3&lt;br /&gt;
&lt;br /&gt;
Example: 12&lt;br /&gt;
&lt;br /&gt;
Add 10&lt;br /&gt;
&lt;br /&gt;
Example: 3[22] million&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
*Relation: Electron rest energy ~= e/7^16 Joules&lt;br /&gt;
Accurate to within: one part in 1000&lt;br /&gt;
&lt;br /&gt;
*Relation: Light-year(miles) ~= 2^(42.42)&lt;br /&gt;
Accurate to within: one part in 1000&lt;br /&gt;
&lt;br /&gt;
*Relation: sin(60 degrees) = (3^(1/2))/2 ~= e/pi&lt;br /&gt;
Accurate to within: one part in 1000&lt;br /&gt;
&lt;br /&gt;
*Relation: 3^(1/2) ~= 2e/pi&lt;br /&gt;
Accurate to within: one part in 1000&lt;br /&gt;
&lt;br /&gt;
*Relation: gamma(Euler's gamma constant) ~= 1/(3^(1/2))&lt;br /&gt;
Accurate to within: One part in 4000&lt;br /&gt;
&lt;br /&gt;
*Relation: Feet in a meter ~= 5/(pi^(1/e))&lt;br /&gt;
Accurate to within: one part in 4000&lt;br /&gt;
&lt;br /&gt;
*Relation: 5^(1/2) ~= 2/e + 3/2&lt;br /&gt;
Accurate to within: one part in 7000&lt;br /&gt;
&lt;br /&gt;
*Relation: Avogadro's number ~= 69^pi^(5^(1/2))&lt;br /&gt;
Accurate to within: one part in 25,000&lt;br /&gt;
&lt;br /&gt;
*Relation: Gravitational constant G ~= 1/(e^((pi - 1)^(pi + 1)))&lt;br /&gt;
Accurate to within: one part in 25,000&lt;br /&gt;
&lt;br /&gt;
*Relation: R(gas constant) ~= (e+1) * (5^(1/2))&lt;br /&gt;
Accurate to within: one part in 50,000&lt;br /&gt;
&lt;br /&gt;
*Relation: Proton-electron mass ratio ~= 6*pi^5&lt;br /&gt;
Accurate to within: one part in 50,000&lt;br /&gt;
&lt;br /&gt;
*Relation: Liters in a gallon ~= 3 + pi/4&lt;br /&gt;
Accurate to within: one part in 500,000&lt;br /&gt;
&lt;br /&gt;
*Relation: g ~= 6 + ln(45)&lt;br /&gt;
Accurate to within: one part in 750,000&lt;br /&gt;
&lt;br /&gt;
*Relation: Proton-electron mass ratio ~= (e^8 - 10)/phi&lt;br /&gt;
Accurate to within: one part in 5,000,000&lt;br /&gt;
&lt;br /&gt;
*Relation: Ruby laser wavelength ~= 1/(1200^2)&lt;br /&gt;
Accurate to within: [within actual variation]&lt;br /&gt;
&lt;br /&gt;
*Relation: Mean Earth Radius ~= (5^8)*6e&lt;br /&gt;
Accurate to within: [within actual variation]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Protip - not all of these are wrong:&lt;br /&gt;
&lt;br /&gt;
*2^(1/2) ~= 3/5 + pi/(7-pi)&lt;br /&gt;
&lt;br /&gt;
*cos(pi/7) + cos(3pi/7) + cos(5pi/7) ~= 1/2&lt;br /&gt;
&lt;br /&gt;
*gamma(Euler's gamma constant) ~= e/3^4 + e/5&lt;br /&gt;
&lt;br /&gt;
*5^(1/2) ~= (13 + 4pi)/(24 - 4pi)&lt;br /&gt;
&lt;br /&gt;
*sigma(1/n^n) ~= ln(3)^e&lt;br /&gt;
&lt;br /&gt;
{{comic discussion}}&lt;br /&gt;
[[Category:Charts]]&lt;br /&gt;
[[Category:Math]]&lt;br /&gt;
[[Category:Physics]]&lt;br /&gt;
[[Category:Protip]]&lt;/div&gt;</summary>
		<author><name>Jgro</name></author>	</entry>

	</feed>