Cisco CLI Output Modifiers

From Ever changing code
Revision as of 14:48, 10 May 2014 by Pio2pio (talk | contribs) (→‎Include multiple patterns)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Include multiple patterns

show int status | i 1/0/13|1/0/14|1/0/15|1/0/16
sh dtp int | i DTP|TRUNK

Output modifiers and Regular Expressions

Special Characters
. = Matches any single character
\ = Matches the character following the backslash. Used to match the face value of special characters.
_ = Matches white space space and select characters such as comma (,), left brace ({), right brace (}), the beginning of the input string, the end of the input string, or a space.
Groups, Nests and Ranges
[ ] = Matches any character within the left and right square brackets.
() = Nest characters for matching or to apply a multiplier too, or for recall
- = Used to create a range of characters that can match within square brackets
Anchors
^ = Matches the character or null string at the beginning of an input string.
$ = Matches the character or null string at the end of an input string.
Multipliers
? = Matches zero or one occurrence of the pattern.
* = Matches zero or more sequences of the character preceding the asterisk.
+ = Matches one or more sequences of the character preceding the plus sign.
Alternation
| = Logical OR. Matches one of the characters or character patterns on either side of the vertical bar.

References