cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
398
Views
5
Helpful
3
Replies

bgp as path reqexp

illusion_rox
Level 1
Level 1

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

mohammedmahmoud
Level 11
Level 11

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.

View solution in original post

3 Replies 3

mohammedmahmoud
Level 11
Level 11

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.

thanks, got it :)

hi Ovais,

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

HTH,

Mohammed Mahmoud.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card