Re: BGP regular exp [bcc][faked-from]

From: Tim Fletcher (groupstudy@fletchmail.net)
Date: Thu Nov 04 2004 - 00:20:30 GMT-3


_ matches a space, or the end of the string. So in the case where the AS
path contains only a 2, you are trying to match the beginning of string
(^), followed by a 2, followed by an end of string (_), followed by another
end of string ($). In theory you would think this wouldn't match, but
testing confirms that it does. Although I wouldn't guarantee that this true
for all versions.

Although either this method or the one Brian provided will work, I find the
approach Brian provided easier to read (others may disagree).

At 08:36 PM 11/3/2004, Cisco Net wrote:
>Marvin,
>But you still have "_" after 2.
>So even if * is zero u will still have ^2_$...
>
>Which would match any AS after 2 right ?
>would that be a problem ?
>Regards
>Cert
>
>
>On Wed, 3 Nov 2004 16:04:06 -0800, marvin greenlee
><marvin@ccbootcamp.com> wrote:
> >
> >
> > ^2__[0-9]*$
> >
> > The * will match 0 or more occurrences, where the + will match one or more.
> >
> > - Marvin Greenlee, CCIE#12237
> > Network Learning Inc
> > marvin@ccbootcamp.com
> > www.ccbootcamp.com (Cisco Training)
> >
> > -----Original Message-----
> > From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
> > Cisco Net
> > Sent: Wednesday, November 03, 2004 3:48 PM
> > To: Group Study
> > Subject: BGP regular exp [bcc][faked-from]
> > Importance: Low
> >
> > How to make one line regular expression that will match the routes
> > originated(directly connected to your AS) from AS 2 OR originated in
> > all the customers AS that are directly connected to AS 2.
> >
> > 2 things
> > -Routes originated in AS2 (and it is directly connected to you
> > so ^2
> > -Originated in AS2's directly connected customer ASs
> > so ^2_[0-9]+$
> >
> > How to make as one line ???
> > Regards
> > Cert
> >
> > _______________________________________________________________________
> > Subscription information may be found at:
> > http://www.groupstudy.com/list/CCIELab.html
> >
> > _______________________________________________________________________
> > Subscription information may be found at:
> > http://www.groupstudy.com/list/CCIELab.html
>
>_______________________________________________________________________
>Subscription information may be found at:
>http://www.groupstudy.com/list/CCIELab.html



This archive was generated by hypermail 2.1.4 : Thu Dec 02 2004 - 06:57:38 GMT-3