The metacharacters and metasequences shown here represent most available types of regular expression constructs and their most common syntax. However, syntax and availability vary by implementation.
Many implementations provide shortcuts to represent some characters that may be difficult to input. (See MRE 114-117.)
Most implementations have specific shorthands for the
alert
, backspace
,
escape character
, form feed
,
newline
, carriage return
,
horizontal tab
, and vertical
tab
characters. For example,
is often
a shorthand for the newline character, which is usually LF (012
octal) but can sometimes be CR (15 octal) depending on the operating
system. Confusingly, many implementations use
to mean both
backspace
and word boundary (between
a “word” character and a non-word
character). For these implementations, means
backspace
in a character class (a set of possible
characters to match in the string) and word boundary elsewhere.
um
Represents a character corresponding to a two- or three- octal digit
number. For example,