C and C++ SoftBench User's Guide
Using Regular Expressions
Pattern Matching
Appendix C358
Match a range of
values
[-] To match ab followed by
any digit, enter:
ab[0-9]
To match any digit
except 5, enter:
[1-46-9]
Note that if you need to
match the dash (-), do
not place it between
any two characters that
could be interpreted as
a range of values. For
example, a-z could be
interpreted as a range
of values, while z-a
would not. To avoid
confusion, place it as
the first or last
character in your
string. For example, to
search for a dash (-),
followed by any digit,
enter:
[-0-9]
Match the
beginning of a line
^
match_expression
To match all
occurrences of stack
that occur at the
beginning of a line,
enter:
^stack
Table C-1 Description of Special Characters in Regular Expressions
To… Use… Example