300-815 · Question #39
Refer to the exhibit. Users report that outbound PSTN calls from phones registered to Cisco Unified Communications Manager are not completing. The local service provider in North America has a require
The correct answer is B. rule 1/^+1(\[2-9\]..\[2-9\]....)$/\1/. Option B correctly strips the +1 prefix from the globalized E.164 format by using a capture group ([2-9]..[2-9]....) to isolate the 10-digit NANP number, then replaces the entire match with \1 - the captured group only - producing the 10-digit format the provider requires. The ^+
Question
Options
- Arule 1/^+1([^*!]+)/ \0/\1/
- Brule 1/^+1([2-9]..[2-9]....)$/\1/
- Crule 1/^+1([2-9]..[2-9]....)$/\1/
- Drule 1 /^+1([2-9]..[2-9]....)$/\0/
How the community answered
(28 responses)- A7% (2)
- B64% (18)
- C21% (6)
- D7% (2)
Explanation
Option B correctly strips the +1 prefix from the globalized E.164 format by using a capture group ([2-9]..[2-9]....) to isolate the 10-digit NANP number, then replaces the entire match with \1 - the captured group only - producing the 10-digit format the provider requires. The ^+1 anchors the match to the leading +1, and the $ ensures the remaining string is exactly 10 valid NANP digits.
Option A is wrong because its replacement string \0/\1/ is malformed - the \0 back-reference returns the entire original matched string (including +1), and the extra slash syntax produces an invalid output string rather than clean 10-digit dialed digits.
Option D fails for the same core reason: it uses \0 as the replacement, which outputs the entire matched expression (still including +1) rather than just the captured 10-digit group. A provider expecting 10 digits would receive +14085551234 instead of 4085551234.
Options B vs C - as presented, they appear textually identical; on the real exam the distractor difference is typically a space or syntax variation in the rule number separator, making only one syntactically valid in IOS.
Memory tip: Think \0 = whole match (zero edits, keeps everything), \1 = first capture group (your stripped/trimmed result). Whenever you need to remove a prefix, you must capture what you want to keep and reference \1, not \0.
Topics
Community Discussion
No community discussion yet for this question.