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:
E?
0
0
42+ .* [21|12]$
1
0
In my opinion B, C, D. E will be correct if 42 69 21112
0
0
Sorry for previous reply, but I have tested on http://www.regexplanet.com/advanced/java/index.html and B,C,D,E answers are correct.
0
0
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
0
0
E is probably 42 69 2121 12
AS value range is 0-65535 so 212112 is not proper AS#
1
0
Does anyone know why D is not correct?
0
0
Not D because it ending with 112 ( not 12 or 21)
0
0
Привет, Олег!
Дамп корректен? Ты сдавался?
0
0
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.
0
0
why D is not correct?
0
0
Answer is B, C, D, which are matching the expression.
A is not matching with expression, whereas E is not valid AS paths.
0
0