= To match any incoming call to the Expressway that is searching for an E.164 address of only 6 digits and append the domain cisco.com to the end, you need to use a pattern match and a replace string using regular expressions. Regular expressions are a way of describing patterns of text using special characters and symbols1. The Expressway supports the use of regular expressions in several features, such as search rules, transforms, and dial plan2.
A pattern match is a regular expression that defines the criteria for matching the incoming call. A replace string is a regular expression that defines how to modify the matched call and add the desired domain. The Expressway uses the following syntax for pattern match and replace string2:
The pattern match is enclosed in parentheses, such as (pattern).
The replace string is preceded by a colon, such as :replace.
The replace string can use backreferences to refer to the matched groups in the pattern match, such as \1, \2, etc.
For example, the pattern match and replace string (pattern):replace means that the Expressway will match the incoming call with the pattern and replace it with the replace string.
In this question, the pattern match should match an E.164 address of only 6 digits. An E.164 address is a global phone number that can have up to 15 digits, starting with a plus sign (+)3. To match only 6 digits, we can use the following regular expression:
({6}\d) : This means that the Expressway will match any 6 consecutive digits (\d) and capture them as a group ({6}). The curly braces indicate the number of repetitions of the preceding character. The parentheses indicate the grouping of the characters.
The replace string should append the domain cisco.com to the end of the matched E.164 address. To do this, we can use the following regular expression:
:\1@cisco.com : This means that the Expressway will replace the matched E.164 address with the first captured group (\1) followed by an at sign (@) and the domain cisco.com.
Therefore, the correct pattern match and replace string using regular expressions are:
The other options are incorrect because:
A. pattern match: ({6}) : This means that the Expressway will match any 6 consecutive characters () and capture them as a group. The asterisk means that the preceding character can be repeated zero or more times. This is too broad and can match non-digit characters as well.
C. pattern match: ({5}\d) : This means that the Expressway will match any 5 consecutive digits (\d) and capture them as a group. This is too short and will not match an E.164 address of 6 digits.
D. replace string: \6@cisco.com : This means that the Expressway will replace the matched E.164 address with the sixth captured group (\6) followed by an at sign (@) and the domain cisco.com. This is incorrect because there is only one captured group in the pattern match, so \6 will not refer to anything.
F. replace string: $@cisco.com : This means that the Expressway will replace the matched E.164 address with a dollar sign ($) followed by an at sign (@) and the domain cisco.com. This is incorrect because the dollar sign is a special character in regular expressions that means the end of the string. To use it literally, it needs to be escaped with a backslash ().
References := Regular Expressions, Cisco Expressway Basic Configuration Deployment Guide, E.164 : The international public telecommunication numbering plan