2635
output-number: Output string of a number involved in number substitution,
consisting of characters such as 0 to 9, #, *, and ., up to 31 characters. The
characters are described in Table687.
The sub-expression (one digit or digit string) before !, %, or + is not
exactly-matched digit(s) and is handled in a similar way the wildcard (.). These
signs cannot be used alone and must be preceded by a valid digit or digit string.
The dot (.) in the input-number and output-number arguments is handled in three
ways:
1The dot (.) in the output-number argument is considered invalid. If you use the
dot-match command to set the dot match rule to end-only (that is, only dots at
the end of the input number are handled), the dots in the output-number
argument are discarded immediately, and the digits which all the dots at the end
of the input number correspond to are added to the end of the output number.
2Extra dots in the output-number argument are discarded. If you use the
dot-match command to set the dot match rule to right-left (from right to left) or
left-right (from left to right), and the number of dots in the output-number
argument is greater than that in the input-number argument, all digits which the
dots in the input-number argument correspond to are selected to replace the dots
in the output-number argument one by one from right to left (or from left to
right). The remaining dots (that are not replaced) in the output-number argument
are discarded.
3Extra dots in the input-number argument are discarded. If you use the dot-match
command to set the dot match rule to right-left (from right to left) or left-right
(from left to right), and the number of dots in the input-number argument is
greater than or equal to that in the output-number argument, the dot handling
includes two cases:
For the right-left dot match rule, digits which the dots in the input-number
argument correspond to are extracted from right to left according to the
number of dots in the output-number argument to replace the dots in the
output-number argument one by one. The digits that are not extracted in the
input-number argument are discarded.
Table687 Meanings of characters in the string argument
Character Meaning
0-9 Digit 0 through 9.
# and * Valid digit each.
. Wildcard, which can match any valid digit. For example, 555.... can match any
number beginning with 555 and ending up with four additional characters.
! The character or sub-expression before the sign does not appear or appears
only once. For example, 56!1234 can match 51234 and 561234.
+ The character or sub-expression before the plus sign can appear one or more
times. However, if the plus sign appears at the head of a number, the number
is an E.164 number and the plus sign itself does not represent a specific
number or number repetition. For example, 9876(54)+ can match 987654,
98765454, 9876545454, and so on, and +110022 is an E.164 number.
% The character or sub-expression before the percent sign does not appear or
appears multiple times. For example, 9876(54)% can match 9876, 987654,
98765454, 9876545454, and so on.