l Common characters
Common characters, including all upper-case and lower-case letters, digits, punctuation
marks, and special symbols, match themselves in a string. For example, "a" matches the
letter "a" in "abc", "202" matches the digit "202" in "202.113.25.155", and "@" matches
the symbol "@" in "xxx@xxx.com".
l Special characters
Special characters are used together with common characters to match complex or special
string combination. Table 2-5 describes special characters and their syntax.
Table 2-5 Description of special characters
Special
characte
r
Syntax Example
\ Defines an escape character, which
is used to mark the next character
(common or special) as the common
character.
\* matches "*".
^ Matches the starting position of the
string.
^10 matches "10.10.10.1" instead of
"20.10.10.1".
$ Matches the ending position of the
string.
1$ matches "10.10.10.1" instead of
"10.10.10.2".
* Matches the preceding element zero
or more times.
10* matches "1", "10", "100", and
"1000".
(10)* matches "null", "10", "1010",
and "101010".
+ Matches the preceding element one
or more times
10+ matches "10", "100", and
"1000".
(10)+ matches "10", "1010", and
"101010".
? Matches the preceding element zero
or one time.
10? matches "1" and "10".
(10)? matches "null" and "10".
. Matches any single character. 0.0 matches "0x0" and "020".
.oo matches "book", "look", and
"tool".
() Defines a subexpression, which can
be null. Both the expression and the
subexpression should be matched.
100(200)+ matches "100200" and
"100200200".
x|y Matches x or y. 100|200 matches "100" or "200".
1(2|3)4 matches "124" or "134",
instead of "1234", "14", "1224", and
"1334".
Huawei AR1200 Series Enterprise Routers
Configuration Guide - Basic Configuration 2 CLI Overview
Issue 04 (2012-05-15) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
22