cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
392
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
Spotlight
Spotlight

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,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)