Beruflich Dokumente
Kultur Dokumente
Show Commands
Regular
egular Expressions Overview
^ Regular Expression
Use this to look for text at the beginning of a string.
Without regular expression
$ Regular Expression
Use this to look for text at the end of a string.
Without regular expression
_ Regular Expression
This replaces a long regular expression list by matching a comma (,), left
brace ({), right brace (}), the beginning of the input string, the end of the
input string, or a space.
Without regular expression
Router#show ip route | include k2
C 192.168.12.0/24 is directly
C 192.168.31.0/24 is directly
C 192.168.30.0/24 is directly
C 192.168.32.0/24 is directly
connected,
connected,
connected,
connected,
Loopback2
Loopback21
Loopback20
Loopback22
[ ] Regular Expression
This matches the characters or a range of characters separated by a hyphen, within left
and right square brackets.
Without regular expression
k
connected,
connected,
connected,
connected,
connected,
connected,
connected,
connected,
connected,
connected,
connected,
connected,
connected,
connected,
connected,
connected,
connected,
connected,
connected,
connected,
connected,
connected,
Loopback2
Loopback19
Loopback18
Loopback3
Loopback4
Loopback21
Loopback20
Loopback5
Loopback15
Loopback14
Loopback17
Loopback16
Loopback1
Loopback11
Loopback10
Loopback13
Loopback12
Loopback7
Loopback6
Loopback9
Loopback22
Loopback8
Router#show ip route
C 192.168.12.0/24 is
C 192.168.13.0/24 is
C 192.168.14.0/24 is
C 192.168.15.0/24 is
C 192.168.11.0/24 is
C 192.168.17.0/24 is
C 192.168.16.0/24 is
C 192.168.19.0/24 is
C 192.168.18.0/24 is
| include k[1-9]_
directly connected,
directly connected,
directly connected,
directly connected,
directly connected,
directly connected,
directly connected,
directly connected,
directly connected,
Loopback2
Loopback3
Loopback4
Loopback5
Loopback1
Loopback7
Loopback6
Loopback9
Loopback8
\ Regular Expression
Use this if the following character is not a wildcard, but
an actual character you are looking for.
Without regular expression
destination-pattern 10..
+ Regular Expression
This matches one or more sequences of the character
preceding the plus sign.
With regular expression
Router#sh run | i 00+
load 7960-7940 P0S3-07-4-00
create profile sync 0002381328447097
number 1100
id mac 0003.6B8B.174A
clock rate 2000000
tftp-server flash:P0S3-07-4-00.bin
tftp-server flash:P003-07-4-00.bin
tftp-server flash:P0S3-07-4-00.loads
tftp-server flash:P003-07-4-00.sbn
tftp-server flash:P0S3-07-4-00.sb2
tftp-server flash:P00405000700.bin
tftp-server flash:P00405000700.sbn
tftp-server flash:P0030702T023.bin
tftp-server flash:P0030702T023.loads
tftp-server flash:P0030702T023.sb2
tftp-server flash:P0030702T023.sbn
load 7910 P00405000700
load 7960-7940 P0030702T023
ip source-address 10.1.1.1 port 2000
number 1000
number 1001