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. And see here for current known issues.

New Member

bgp as path reqexp

hi everyone, i was reading ccie exam cert bt wendell odom and got confused in one of its examples. its from page 435 table 13-5.

reg exp is ^123_.*_45$

"An AS_PATH beginning with AS 123 and ending in AS 4, with atleast one other AS in between."

i think its bit wrong coz . is followed by * which means zero or more occurence of the preceding character now if there is no character between 123 and 45 then its also valid isnt it ? so why its saying that atleast one AS between them ?

am i wrong in my understanding ? kindly tell me.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: bgp as path reqexp

Hi,

Theoretically speaking you are right, ".*" means zero or more, but the fact that you have "_" before and after it, and thus this regular expression can't match 123 45, as this one has only one space between the 2 ASs, then practically this regexp will only match when there is at lease one AS in between.

HTH,

Mohammed Mahmoud.

3 REPLIES

Re: bgp as path reqexp

Hi,

Theoretically speaking you are right, ".*" means zero or more, but the fact that you have "_" before and after it, and thus this regular expression can't match 123 45, as this one has only one space between the 2 ASs, then practically this regexp will only match when there is at lease one AS in between.

HTH,

Mohammed Mahmoud.

New Member

Re: bgp as path reqexp

thanks, got it :)

Re: bgp as path reqexp

hi Ovais,

You are very welcomed :) and thanks for using the rating system.

HTH,

Mohammed Mahmoud.

114
Views
5
Helpful
3
Replies