Cisco Systems 6500 manual $ \ \+, aeiou, abcdABCD, a-dA-D, a-dqsv, Character, Special Meaning

Models: 6500

1 160
Download 160 pages 24.26 Kb
Page 22
Image 22
\$ \_ \+

Chapter 1 Command-Line Interface

Using the CLI String Search

Table 1-4 Characters with Special Meaning (continued)

Character

Special Meaning

 

 

^

Matches the beginning of the string.

 

 

$

Matches the end of the string.

 

 

_ (underscore)

Matches a comma (,), left brace ({), right brace (}), left parenthesis ( ( ),

 

right parenthesis ( ) ), the beginning of the string, the end of the string, or a

 

space.

 

 

To enter these special characters as single-character patterns, remove the special meaning by preceding each character with a backslash (\). These examples are single-character patterns matching a dollar sign, an underscore, and a plus sign, respectively.

\$ \_ \+

You can specify a range of single-character patterns to match against command output. For example, you can create a regular expression that matches a string containing one of the following 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 (-). Simplify 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 the lower- or uppercase alphabet, 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 (]) or the letter d:

[^\]d]

Catalyst 6500 Series Switch SSL Services Module Command Reference

1-8

OL-9105-01

 

 

Page 22
Image 22
Cisco Systems 6500 manual $ \ \+, aeiou, abcdABCD, a-dA-D, a-dqsv, Character, Special Meaning