From: Nick Nikolov (nnikolov@xxxxxxxxxxx)
Date: Sun Jun 23 2002 - 09:36:09 GMT-3
Omer,
Your solution would work fine, except with the following bgp path:
10 100
It wont picked it because you have two _ pattern.
The other way to make it is:
^10_(.*_)?100$
or making it more complex, if you want to filter path learned from 10,
containing 200 and originated in 100
^10_(.*_)?200_(.*_)?100$
Nick
----- Original Message -----
From: "Omer Ansari" <root@ansari.com>
To: "Brian McGahan" <brian@cyscoexpert.com>
Cc: <ccielab@groupstudy.com>
Sent: Saturday, June 22, 2002 8:05 PM
Subject: Re: Regular Expression Fun
> Brian,
> have not tested it, but thinking *nix/perl regexps, I would think
>
> ^10_.*_100$
>
> could work also.
>
> ".*" can match nothing also. (atleast that's true for *nix!)
>
> the only problem I can see with the above is the second "_" though..
>
>
> On Fri, 21 Jun 2002, Brian McGahan wrote:
>
> > Groupmembers,
> >
> > I have an interesting teaser, and hopefully it will spawn a
> > useful thread. I was making one of my students play with regular
> > expressions today, and I asked him to create a regexp that matches
> > routes learned from AS 10, which have originated in AS 100. I came up
> > with: ^10_(|.*_)100$
> >
> > My logic being
> >
> > ^10_ learned from 10, space
> > (|.*_) nothing, or something that ends in a space
> > 100$ originated from AS 100
> >
> > My logic may be off. This is why I gave up programming ;)
> >
> > Brian McGahan, CCIE #8593
> > Director of Design and Implementation
> > brian@cyscoexpert.com
> >
> > CyscoExpert Corporation
> > Internetwork Consulting & Training
> > http://www.cyscoexpert.com
> > Voice: 847.674.3392
> > Fax: 847.674.2625
This archive was generated by hypermail 2.1.4 : Tue Jul 02 2002 - 08:12:40 GMT-3