Which two AS paths match?

Given the following regular expression:
.* 14203+(21870110458)
Which two AS paths match? (Choose two.)

Given the following regular expression:
.* 14203+(21870110458)
Which two AS paths match? (Choose two.)

A.
27522 2187010458

B.
27522 14203 14203 14203 21870

C.
14203 21780 10458

D.
14203 21780 27522

Explanation:



Leave a Reply 8

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


jslaven

jslaven

If the regular expression is: .* 14203+ (21870|10458) and there’s a pipe “|” between 21870 and 10458, then answer B and D.

jslaven

jslaven

Correction: answer b and c

Dylan

Dylan

I also agree. B and C are correct

Definitions
. ==> One instance of any character except the space. For example, .456 matches 1456 or 6456.
+ ==> One or more instances of the immediately preceding term. For example, tre+ matches messages with tree or tread but not trough.
* ==> Zero or more instances of the immediately preceding term. For example, 234* matches 2345698 or 2347985

.*14203+ (21870 | 10458)

(.) Can begin with one instance of any character except space. Meaning it can begin with anything.
The Any Characters we chose in (*) is preceeding (*)

What determines the answer are these
Must have one or more instances of 14203 (Makes answer A wrong)
Then can have either 21870 or 10458 at the end (Makes answer D wrong)

miro312

miro312

It should be: .* 14203+ (21870|10458)$ and therefore B and C are correct.

testking502

testking502

D is also incorrect as it doesn’t end with either 21870 or 10458. Only C is correct and matches.

testking502

testking502

I’m smoking crack.

B is the only correct answer.

C ends with both 21870 and 10458. The “()” is an OR operator. It can’t match both.

testokhan

testokhan

by playing left and right the only option gets the two results is:

.* 14203+ (21870|10458)$

selecting three options:
1.Perform multiline matching

2. Perform a global match (don’t stop at first match)

3. DOT ALL. The dot (.) metacharacter matches any character INCLUDING line breaks.

answer A & B

A: 27522 2187010458
B: 27522 14203 14203 14203 21870

http://www.freeformatter.com/regex-tester.html