DES-7200 Configuration Guide Chapter 6 BGP
Configuration
6-45
6.27.2 Regular Expression Configuration
The regular expression is the formula to match the string according to a certain
template. The regular expression is used to evaluate the text data and return a
true or false value. That is to say, whether the expression can describe this data
correctly.
6.27.2.1 Description of Control Characters for
Regular Expression
The BGP path attribute uses the regular expression. Here will briefly describe the
use of the special characters for the regular expression:
Characters Signs Special Functions
Period
.
Match with any single character.
Asterisk
*
Match with none or any sequence of
the string.
Plus
+
Match with one or any sequence of
the string.
Interrogation Mark
?
Match with none or one sign of the
string.
Plus Sign
^
Match with the starting of the string.
Dollar
$
Match with the end of the string.
Underlining
_
Match with the comma, bracket, the
starting and end of the string and
blank.
Square Brackets [ ]
Match with the single character
within the specified scope.
6.27.2.2 Application Example of Regular
Expression
Run the show ip bgp command on the device:
DES-7200# show ip bgp
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Status Network Next Hop Metric LocPrf Path
------ ------------------ --------------- -------- --------
-------------------
*> 211.21.21.0/24 110.110.110.10 0 1000 200 300
*> 211.21.23.0/24 110.110.110.10 0 1000 200 300
*> 211.21.25.0/24 110.110.110.10 0 1000 300