Regex Cheat Sheet/Literal backslash

Match a backslash character.

Section: Escaping and Literals

Literal backslash

regex
regex
\\
Explanation

Backslashes themselves must usually be escaped.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Escaping and Literals
Literal dot
Match an actual period character.
OpenIn sheetregexsame section
Escaped metacharacters
Match literal regex metacharacters.
OpenIn sheetregexsame section
Quoted literal block
Treat a whole block as literal text.
OpenIn sheetregexsame section
Literal hyphen inside class
Match a hyphen or underscore.
OpenIn sheetregex1 tag match
Start of string
Match only at the beginning of the input.
Digit shorthand
Match one ASCII digit character.