Format String Syntax

Literals

All characters are taken literally except "(" ")" "$" "\" "?" ":", those must be prefixed by the escape character "\".

Marked subexpressions

The text values used with the format string are labeled "$1" to "$9".
"`" expands to all the text from the end of the previous match to the start of the current match, if there was no previous match, then everything from the start of the text to the start of the match.
"'" expands to all the text from the end of the match to the end of the text.

Miscellaneous escape sequences

\aBell character 0x07.
\fForm feed character 0x0C.
\nNewline character 0x0A.
\rCarriage return character 0x0D.
\tTab character 0x09.
\vVertical tab character 0x0B.
\xXXA hexadecimal character code, where XX is one or more hexadecimal digits.
\x{XX}A hexadecimal character code, where XX is one or more hexadecimal digits, optionally a Unicode character.
\cZThe ASCII escape character x, for example \c@ is equivalent to escape-@.
\eEscape character.