Emacs: Regex Backslash in Command Prompt
Regex in Emacs Command's Prompt
In emacs command's prompt, regex is not a string. Do not type the the string quote.
But because it is not a string, it does not understand string syntax such as \n
for newline.
You must use a literal newline or tab.
- Match a literal dot. →
\.
- Match a literal backslash. →
\\
- Match a literal asterisk. →
\*
- Match a literal question mark. →
\?
- Match a literal plus sign. →
\+
- Match a literal vertical line. →
\|
- Match literal square brackets. →
\[something\]
- Match literal parenthesis. →
(something)