Quidway NetEngine20/20E
Configuration Guide - Basic Configurations
3 CLI Overview
Issue 05 (2010-01-30)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
3-11
3.8.2 Filtering the Display
Do as follows on the router:
Run:
display current-configuration | include ip
The commands that include "ip" are displayed.
3.9 Filtering the Information Through Regular Expressions
When a lot of information is output, you can filter the display information through regular
expressions.
The regular expression is a tool for matching and replacing modes. Users should construct the
matching mode based on certain rules, and then match the mode with the target object.
To help users construct the matching mode flexibly, regular expressions provide some special
characters that are called metacharacters. Metacharacters are used to define the matching
modes of other characters in the regular expressionMetacharacters are described in
Table 3-6
.
Table 3-6
Metacharacter description
Metacharacter
Connotation
\ Escape
character
.
Matches any single character including the space except for \n.
*
Characters on the left of it appear for 0 or many times continuously
in the target object.
+
Characters on the left of it appear for 1 or many times continuously
in the target object.
|
The 'or' relationship exists between characters on the left and right
sides of it.
^
Characters on the right of it must appear at the beginning of the
target object.
$
Characters on the left of it must appear at the end of the target
object.
[xyz]
Matches the character listed in the square character.
[^xyz]
Matches any character that is not listed in the square bracket (^ is on
the left of the character).
[a-z]
Matches any character within the specified range.
[^a-z]
Matches any character that is not within the specified range.
{n}
The matches appear for n times (n is a non-negative integer).
{n,}
The matches appear for at least n times (n is a non-negative integer).