![]() |
The below table is an example that depicts a mix of regular expression rules and simple pattern match rules.
Min length | Max length | Pattern | Delete Length | Replacement | |
---|---|---|---|---|---|
A | 4969710([0-5]\\d{0,3}) | $1 | |||
B | 4969(\\d{1,}) | 0$1 | |||
C | * | * | 49 | 2 | 00 |
D | * | * | * | 1 | 000 |
A |
This rule uses a RegEx pattern to specify that Call Control Services
is to look for a string starting with 4969710, matching an extension
that starts with 0 through 5 and is 1 to 4 digits in length.
The parentheses around the extension indicate a group, which is correlated with the $1 in the replacement string. The $1 says to replace the matching string (the entire E.164 number) with the group designated by the parentheses (the extension). For example, the incoming string 496971001234 would be converted to 01234. As another example, the incoming string 49697102123 would be converted to 2123. |
B |
This rule uses a RegEx pattern to specify that Call Control Services
is to look for a string starting with 4969, followed by 1 or more
digits.
The parentheses again correlate with the $1 in the replacement string, which says to take the group (the E.164 number without country code or city code) and to add a 0 in front of it (the ARS code). For example, the incoming string 49695671234 would be converted to 05671234. |
C | This rule uses a simple pattern match. The asterisk in the Min and Max length permits a number of any length. The pattern indicates that Call Control Services is to look for a string starting with 49. When it detects 49, it deletes the first 2 digits, and replaces them with 00. For example, the incoming string 49891234567 would be converted to 00891234567. |
D | This rule uses a wildcard pattern match. The asterisk in the Min and Max length permits a number of any length, and the asterisk in the pattern permits pattern of digits. When any number that does not satisfy the first 3 rules (A,B, and C) is detected, Call Control Services deletes the first digit and replaces it with 000. For example, the incoming string 13035391234 would be converted to 0003035391234. |