Which three AS paths match the regex statement?

You are hired at an ISP and your new employer asks you to become familiar with the routing
policy. The 42+.*[21112]$ regular expression is in one of the policies. Which three AS paths match
the regex statement? (Choose three.)

You are hired at an ISP and your new employer asks you to become familiar with the routing
policy. The 42+.*[21112]$ regular expression is in one of the policies. Which three AS paths match
the regex statement? (Choose three.)

A.
42 42 42 42 6

B.
42 42 42 27 21

C.
42 42 42 42 12

D.
42 69 2112 112

E.
42 69 212112

Explanation:



Leave a Reply 12

Your email address will not be published. Required fields are marked *


jslaven

jslaven

42+ .* [21|12]$

andborys

andborys

In my opinion B, C, D. E will be correct if 42 69 21112

ikhan

ikhan

42+ means any occurrence of consecutive 42 will be passed
. means anything can come in between any number of time
*[21|12]$ means any number ending with 21 or 12 will be passed

bkhan

bkhan

E is probably 42 69 2121 12
AS value range is 0-65535 so 212112 is not proper AS#

Albert

Albert

Does anyone know why D is not correct?

Oleg

Oleg

Not D because it ending with 112 ( not 12 or 21)

Ivan

Ivan

Привет, Олег!

Дамп корректен? Ты сдавался?

regexpert

regexpert

The regex means the following:

42+.*[21112]$

– 4
– one or more 2s
– zero or more characters
– either a 2, 1, 1, 1 or 2 at the end

[21112] can also be written as [12], which would accomplish the same thing

So the answers here would be
B, C, D or E

I think this question has some typos.

Jacky

Jacky

why D is not correct?

kp

kp

Answer is B, C, D, which are matching the expression.
A is not matching with expression, whereas E is not valid AS paths.