From: Dennis J. Hartmann (dennisjhartmann@hotmail.com)
Date: Wed May 25 2005 - 09:08:42 GMT-3
I created this E-Mail before stumbling across this quote in the BGP
Configuration Guide:
See the "Regular Expressions" appendix in the Cisco IOS Terminal Services
Configuration Guide for more information on forming regular expressions
Does anyone know if there is documentation on Regular Expressions
somewhere on the UNIVERCD site? Please disregard now that I know it's in
the termal services configuration guide.
I don't like to post to the list with just a question, so I'll share
some of my regular expression information below:
Matches any single character
* Matches zero or more sequences of the pattern
^ Begins with
$ End with
[5-9] or [56789] Matches one character in the range of 5 through 9
(123) Matches AS 123
+ Matches one or more sequences of the pattern
_ Matches the following: , { } ( ) ^ $ Blank Space
Examples
_200_ Matches an instance of AS 200 ANYWHERE in the AS-PATH
^200_ AS-Path begins with (originated from) AS 200
^200(_200)*$ Begins with and ends with (directly connected to) AS 200
with one (or more) instances of AS 200 due to AS-PATH prepending
200$ AS-PATH ends with AS 200 (AS 200 is the last AS that the BGP
path traversed).
^([0-9]+)(_\1)*$ Matches one or more instance of a neighboring AS. I
don't understand the (_\1) myself. If anyone has a better understanding of
this, please share.
* Permit ANY
\(200 Matches (200 which could be seen in a BGP Community's
AS-PATH. The \ matches any one special character. In this case, the
special character is the (.
Sincerely,
Dennis J. Hartmann
White Pine Communications
CCSI#23402/CCIP/CCNP/CCDP/CCNA/CCDA
Cisco IP Voice Support & Design Specialist
Cisco Optical, VPN & IDS Specialist
MCSE
This archive was generated by hypermail 2.1.4 : Fri Jun 03 2005 - 10:12:02 GMT-3