The backslash (\) is a typographical mark (glyph) used mainly in computing and is the mirror image of the common slash (/). It is sometimes called a hack, whack, escape (from C/UNIX), reverse slash, slosh, backslant, downhill, backwhack, and in rare occasions, bash, reverse slant, and reversed virgule. In Unicode, it is encoded at U+005C \ reverse solidus (HTML \
).
Bob Bemer introduced the "\" character into ASCII on September 18, 1961, as the result of character frequency studies. In particular the \ was introduced so that the ALGOL boolean operators ∧ (AND) and ∨ (OR) could be composed in ASCII as "/\" and "\/" respectively. Both these operators were included in early versions of the C programming language supplied with Unix V6, Unix V7 and more currently BSD 2.11.
In many programming languages such as C, Perl, and PHP and in Unix scripting languages, the backslash is an escape character, used to indicate that the character following it should be treated specially (if it would otherwise be treated normally), or normally (if it would otherwise be treated specially). For instance inside a C quoted string the sequence \n
produces a newline byte instead of an 'n', and the sequence \"
produces an actual double quote rather than the special meaning of the double quote ending the string. In various regular expression languages it is used this way, changing subsequent literal characters into metacharacters and vice versa. Following this usage, the double backslash sequence \\
of course produces a normal literal backslash.