<?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=Vardis</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=Vardis"/>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php/Special:Contributions/Vardis"/>
		<updated>2026-04-30T15:26:30Z</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=110500</id>
		<title>1638: Backslashes</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=1638:_Backslashes&amp;diff=110500"/>
				<updated>2016-02-03T06:29:33Z</updated>
		
		<summary type="html">&lt;p&gt;Vardis: /* Explanation */ fixed incorrect use of &amp;quot;it's&amp;quot;&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;
{{incomplete|Created by a regex noob.}}&lt;br /&gt;
[[wikipedia:regular expression|Regular expressions]] are often used to search large bodies of text for strings that match a particular pattern. Several characters in regex are &amp;quot;special characters&amp;quot;, which by default do not match the literal character, but instead help indicate the pattern. To find a special character literally, you must &amp;quot;escape&amp;quot; it, by preceding it with a backslash. This, of course, means that the backslash is a special character, so to search for a literal backslash character, you need to type two backslashes -- \\. Occasionally, the text being searched will contain regular expressions, and occasionally you will need to search for an escaped backslash. To do ''that'', you need to escape two backspaces -- \\\\. This gets very silly, very quickly.&lt;br /&gt;
&lt;br /&gt;
Things get even worse when you have to embed a regexp in a language like Java, which both lacks perl's syntactic sugar to demarcate the beginning and end of a regexp, and uses the backslash for its own special characters. So, to create the regexp \\\\ in Java, you'd have to use the string &amp;quot;\\\\\\\\&amp;quot;, since each backslash needs to be quoted to get through the Java string parser before it can then be considered as a regular expression.&lt;br /&gt;
&lt;br /&gt;
The regex in the title text seems to be invalid. The left-parentheses character is a literal, causing it to fail to match up with the right-parentheses later in the expression. Whatever Randall was trying to do here, this expression didn't do the job.&lt;br /&gt;
&lt;br /&gt;
==Transcript==&lt;br /&gt;
\ - backslash&lt;br /&gt;
&lt;br /&gt;
\\ - real backslash&lt;br /&gt;
&lt;br /&gt;
\\\ - _real_ real backslash&lt;br /&gt;
&lt;br /&gt;
\\\\ - actual backslash, for real this time&lt;br /&gt;
&lt;br /&gt;
\\\\\ - elder backslash&lt;br /&gt;
&lt;br /&gt;
\\\\\\ - backslash which escapes the screen and enters your brain&lt;br /&gt;
&lt;br /&gt;
\\\\\\\ - backslash so real it transcends time and space&lt;br /&gt;
&lt;br /&gt;
\\\\\\\\ - backslash to end all other text&lt;br /&gt;
&lt;br /&gt;
\\\\\\\\\\\... - the true name of ba'al, the soul-eater&lt;br /&gt;
&lt;br /&gt;
{{comic discussion}}&lt;/div&gt;</summary>
		<author><name>Vardis</name></author>	</entry>

	</feed>