Troubleshooting guide
Appendix
61200860L1-29.4E Copyright © 2012 ADTRAN, Inc. 83
Appendix
AS Regular Expressions
Regular expressions, also known as regexp, are used in BGP to identify routes that are to be included in
outbound routing advertisements or filtered from received inbound routing updates. Regular expressions
identify an expected pattern to match against the AS path associated with a BGP route. AS paths identified
by the regular expressions are subject to the actions specified in AOS.
Regular expressions are defined in the Global Configuration mode using the command
ip as-path-list.
Refer to Filtering Routes According to AS Path on page 26 for more information on this command.
There are four types of regular expressions: atom, range, pie
ce, and branch.
Atom
An atom is a single character.
Table 14. Atom
. Matches any single character.
^ Matches the beginning of the input string.
$ Matches the end of the input string.
\ Matches the character.
-
Matches a comma (,), left brace ({), right brace (}), the
beginning of the input string, the end of the input string,
or a space
Range
A range is a sequence of characters contained within square brackets (f
or example, [0-9]).
Table 15. Piece
* Matches 0 or more sequences of the atom.
+ Matches 1 or more sequences of the atom.
? Matches the atom or the null string.
Piece
A piece is an atom followed by one of the following symbols:
Branch
A branch is 0 or more integrated pieces.
Character Definition
Character Definition