300-070 · Question #257
Which pattern does the route pattern \+61278[^3-5]59XXX match?
The correct answer is D. +61278259001. Breaking down the pattern: '\+' matches a literal '+', '61278' matches literally, '[^3-5]' is a negated character class matching any single digit NOT in the range 3 through 5 (so it matches 0, 1, 2, 6, 7, 8, or 9), '59' matches literally, and 'XXX' matches any three digits…
Question
Which pattern does the route pattern +61278[^3-5]59XXX match?
Options
- A278259001
- B+61278359001
- C+61278459001
- D+61278259001
How the community answered
(31 responses)- A23% (7)
- B3% (1)
- C10% (3)
- D65% (20)
Explanation
Breaking down the pattern: '+' matches a literal '+', '61278' matches literally, '[^3-5]' is a negated character class matching any single digit NOT in the range 3 through 5 (so it matches 0, 1, 2, 6, 7, 8, or 9), '59' matches literally, and 'XXX' matches any three digits (0–9). Option D (+61278259001) matches because '2' satisfies [^3-5]. Option C (+61278459001) fails because '4' is within the excluded range 3–5. Option B fails because '3' is also within the excluded range. Option A (278259001) fails because it is missing the required leading '+'.
Topics
Community Discussion
No community discussion yet for this question.