350-801 · Question #536
An engineer must configure a voice translation rule on a Cisco voice gateway to truncate numbers down to the last four digits. Which voice translation regex rule must the engineer use?
The correct answer is A. rule 1 /^.*\(....\)/ /\1/. The correct regex is: rule 1 /^.\(....\)/ /\1/ Breaking it down: '^.' matches any number of leading characters (greedy), '\(....\)' captures exactly four characters in a tagged group (using Cisco IOS regex syntax where parentheses are escaped with backslashes), and '/\1/'…
Question
An engineer must configure a voice translation rule on a Cisco voice gateway to truncate numbers down to the last four digits. Which voice translation regex rule must the engineer use?
Options
- Arule 1 /^.*(....)/ /\1/
- Brule 1 /*1(2-9]..../ /\1/
- Crule 1 /^.*(..)/ /\4/
- Drule 1 /^[2-9](..)/ /.3/
How the community answered
(43 responses)- A81% (35)
- B2% (1)
- C5% (2)
- D12% (5)
Explanation
The correct regex is: rule 1 /^.*(....)/ /\1/
Breaking it down: '^.*' matches any number of leading characters (greedy), '(....)' captures exactly four characters in a tagged group (using Cisco IOS regex syntax where parentheses are escaped with backslashes), and '/\1/' replaces the entire matched string with only the captured four-character group. This effectively strips all leading digits and retains only the last four. Option B uses character class syntax incorrectly, Option C uses '/\4/' (a nonexistent group), and Option D anchors to a specific digit range and uses an incorrect backreference.
Topics
Community Discussion
No community discussion yet for this question.