Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

regexp question

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

  • Other Network Infrastructure Subjects
1 REPLY
Cisco Employee

Re: regexp question

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,

88
Views
5
Helpful
1
Replies
This widget could not be displayed.