Introduction
Cisco Sx350 Ph. 2.2.5 Devices - Command Line Interface Reference Guide 46
1
Anchoring
You can instruct the system to match a regular expression pattern against the
beginning or the end of the string. You anchor these regular expressions to a
portion of the string using the special characters shown in Table 2..
For example, the regular expression ^con matches any string that starts with con,
and $sole matches any string that ends with sole.
In addition to indicating the beginning of a string, the ^ symbol can be used to
indicate the logical function not when used in a bracketed range. For example, the
expression [^abcd] indicates a range that matches any single letter, as long as it is
not the letters a, b, c, or d.
Table 2: Special Characters Used for Anchoring
Character
Description
^
Matches the beginning of the string.
$
Matches the end of the string.