1-14
Catalyst 6500 Series Switch Command Reference—Release8.4
OL-6244-01
Chapter2 Catalyst 6500 Series Switch and ROM Monitor Commands
Switch CLI
To enter these special characters as single-character patterns, remove the special meaning by preceding
each character with a backslash (\). These examples are single-c haracte r pattern s matchin g a dolla r sign,
an underscore, and a plus sign, respectively.
\$ \_ \+
You can specify a range of singl e-char acter pa ttern s to mat ch agai nst comm and outp ut. F or e xample, you
can create a regular expression that matches a string containing one of the f ollowing letters: a, e, i, o, or
u. One and only one of these characters must exist in the string for pattern matching to succeed. To
specify a range of single-character patterns, enclose the single-character patterns in square brackets
([ ]) . For example,
[aeiou]
matches any one of the five vowels of the lowercase alphabet, while
[abcdABCD]
matches any one of the first four letters of the lower- or uppercase alphabet.
You can simplify ranges by entering only the end points of the range separated by a dash (-). Sim pli fy
the previous range as follows:
[a-dA-D]
To add a dash as a single-character pattern in your range, include another dash and precede it with a
backslash:
[a-dA-D\-]
You can also include a right square bracket (]) as a single-character pattern in your range. To do so, enter
the following:
[a-dA-D\-\]]
The previous example matches any one of the first four letters of t h e lower- or up perc ase al ph abet , a
dash, or a right square bracket.
You can reverse the matching of the range by including a caret (^) at the start of the range. This example
matches any letter except the ones listed:
[^a-dqsv]
This example matches anything except a right square bracket (]) o r th e let ter d:
[^\]d]
^ Matches the beginning of the string.
$ Matches the end of the string.
_ (underscore) Matches a word delimiter. All alphanumeric characters and the underscore
itself (_) form a word.
Table1-4 Characters with Special Meaning (continued)
Character Special Meaning