# 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.)

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:

## 12 Comments on “Which three AS paths match the regex statement?”

1. andborys says:

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

0

0
2. ikhan says:

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
3. bkhan says:

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

1

0
1. Ivan says:

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

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

0

0
4. regexpert says:

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
5. kp says:

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