User Guide
105
Router User Guide
AS P
ATH
R
EGULAR
E
XPRESSIONS
This appendix provides information about how to use and configure regular expressions for use with
BGP4 routing protocol commands.
Matching AS Paths
An AS path regular expression is a regular expression with the alphabet used as the set of AS
numbers defining a set of AS paths.
Note that according to this definition, AS path regular expressions are implicitly anchored at the
beginning and end.
The following examples provide more information:
AS Path Regular Expressions (regex)
A regex is a character string containing one of the following:
690 Matches only the specific AS path “690.”
. *690 .* Matches any AS path containing 690.
690 .* Matches any AS path beginning with 690.
. *690 Matches any AS path ending in 690.
term Matches the given term.
regex1 regex2 Matches a path that is a concatenation of two paths, P1 and P2. P1 matches regex1 and P2
matches regex2. Note thatspaces are ignored in general, but should be used between two
concatenated ASs to distunguish them.
regex1 |regex2 Matches a path that matches regex1 or regex2.










