From: Hobbs (deadheadblues@gmail.com)
Date: Wed Oct 22 2008 - 21:57:55 ARST
Thank you guys! I will try all of these. Basically I kind of settled down
close to the one Joe had suggested. I was basically trying to find who had
the longest prepend in our environment. Some guys prepend their AS over a
dozen times and I was curious as to who was the longest. I was afraid if my
regexp was too long I would tie up the router...cuz it looked it was
starting to choke in my terminal :)
so far I tried 18 of these in a row: [0-9]+_ and this gives any AS path with
18 numbers, not just 18 of the same one.
thanks again!
On Wed, Oct 22, 2008 at 3:48 PM, Victor Cappuccio <vcappuccio@gmail.com>wrote:
> hi, maybe something like
> ^([0-9]+)(_\1)*$
> also could help ??
>
>
> R1(config-router)#do show ip bgp reg ^([0-9]+)(_\1)*$
> BGP table version is 3, local router ID is 172.22.81.1
> Status codes: s suppressed, d damped, h history, * valid, > best, i -
> internal,
> r RIB-failure, S Stale
> Origin codes: i - IGP, e - EGP, ? - incomplete
>
> Network Next Hop Metric LocPrf Weight Path
> *> 2.2.2.0/24 172.22.142.2 0 0 2 2 2 2 2 2 2
> 2 2 ?
> R1(config-router)#do show ip bgp reg ^(2+)(_\1)*$
> BGP table version is 3, local router ID is 172.22.81.1
> Status codes: s suppressed, d damped, h history, * valid, > best, i -
> internal,
> r RIB-failure, S Stale
> Origin codes: i - IGP, e - EGP, ? - incomplete
>
> Network Next Hop Metric LocPrf Weight Path
> *> 2.2.2.0/24 172.22.142.2 0 0 2 2 2 2 2 2 2
> 2 2 ?
> R1(config-router)#
>
> thanks,
>
>
>
> On Wed, Oct 22, 2008 at 7:50 PM, Marko Milivojevic <markom@markom.info>wrote:
>
>> > Suppose I wanted to find all routes that have the same AS number in a
>> > row 8
>> > or more times...is this possible using regexp?
>>
>> I don't think that IOS regex engine supports "match N occurences"
>> syntax that more advanced regex engines (like the one in Perl, for
>> example) do. If if did support it, it would look something like:
>>
>> _(12345){8,}
>>
>> If you want to match 8 times or more, where 8 is fixed, you could do
>> something like (oh, ugly):
>>
>> _12345_12345_12345_12345_12345_12345_12345_12345_(12345)*
>>
>> --
>> Marko
>> CCIE #18427 (SP)
>> My network blog: http://cisco.markom.info/
>>
>>
>> Blogs and organic groups at http://www.ccie.net
>>
>> _______________________________________________________________________
>> Subscription information may be found at:
>> http://www.groupstudy.com/list/CCIELab.html
>>
>>
>>
>>
>>
>>
>>
>>
>
>
> --
> Victor Cappuccio
> CCIE R/S# 20657
> CCSI# 30452
> www.anetworkerblog.com
Blogs and organic groups at http://www.ccie.net
This archive was generated by hypermail 2.1.4 : Sat Nov 01 2008 - 15:35:22 ARST