cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
283
Views
5
Helpful
1
Replies

regexp question

wgmt
Level 1
Level 1

Can anyone think of a more elegant way of expressing this:

ip as-path access-list 20 permit ^12345_[0-9]*_[0-9]*_[0-9]*_[0-9]*_$

I am getting the desired effect, which is to accept routes upto 4 hops past the peer AS, but it's just so ugly.

Is there a better way to do this?

Thanks,

BT

1 Reply 1

Harold Ritter
Cisco Employee
Cisco Employee

Unfortunately we don't currently have an equivalent to the POSIX regexp that would allow one to specify the minimum and maximum number of occurence for a given string as follow:

^12345 ([0-9]_){1,4}$

Given the available regexp set, your as-path list is probably the best I could come up with.

Hope this helps,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México