Tools.h++ Manual

104011 Tandem Computers Incorporated 21-69
21
2.2 A one-character RE followed by a plus (+) matches one or more
occurrences of the RE. Hence, [a–z]+ matches one or more lower-case
characters.
2.3 A question mark (?) is an optional element. The preceeding RE can occur
zero or once in the string—no more. E.g. xy?z matches either xyz or xz .
2.4 The concatenation of REs is a RE that matches the corresponding
concatenation of strings. E.g., [A–Z][a–z]* matches any capitalized word.
Finally, the entire regular expression can be anchored to match only the
beginning or end of a line:
3.1 If the caret (^) is at the beginning of the RE, then the matched string
must be at the beginning of a line.
3.2 If the dollar sign ($) is at the end of the RE, then the matched string must
be at the end of the line.
The following escape codes can be used to match control characters:
\
b
backspace
\
e
ESC (escape)
\
f
formfeed
\
n
newline
\
r
carriage return
\
t
tab
\
xddd
the literal hex number 0xddd
\
^C
Control code. E.g. \^D is "control-D"