The ‘\’ character has one of four different meanings, depending on the context in which you use it and what syntax bits are set (see Syntax Bits). It can: 1) stand for itself, 2) quote the next character, 3) introduce an operator, or 4) do nothing.
RE_BACKSLASH_ESCAPE_IN_LISTSis not set. For example, ‘[\]’ would match ‘\’.
RE_NO_BK_REFin Syntax Bits. Also:
emacsdefined, then ‘\sclass’ represents the match-syntactic-class operator and ‘\Sclass’ represents the match-not-syntactic-class operator (see Syntactic Class Operators).
you don’t have to explicitly quote special characters to make
them ordinary. For instance, most characters lose any special meaning
inside a list (see List Operators). In addition, if the syntax bits
aren’t set, then (for historical reasons) the matcher considers special
characters ordinary if they are in contexts where the operations they
represent make no sense; for example, then the match-zero-or-more
operator (represented by ‘*’) matches itself in the regular
expression ‘*foo’ because there is no preceding expression on which
it can operate. It is poor practice, however, to depend on this
behavior; if you want a special character to be ordinary outside a list,
it’s better to always quote it, regardless.