Suffix of a number
In a general context of string processing in programming, I would call the substring that appears in the end a postfix. Collins has postfix as a synonym for suffix, while defining suffix as
one or more numbers or letters added to the end of a code number to indicate, for example, what area something belongs to.
To compare, a substring that appears in the beginning would be a prefix, and a substring in the middle would be an infix.
That it is a phone number does make a difference. Phone numbers are encodings, and each section has a meaning and a purpose.
1-800-555-1212 x1234
I would label the sections of this phone number in this manner:
1-800-555-1212 x123
| | | | |
| | | | extension (if any)
| | | |
| | | line number
| | |
| | exchange
| |
| area code
|
prefix
However, the above is an American phone number format, and it assumes dialing on an outside line.
+972500001234
I might guess that the +9 is a prefix for reaching an outside line from within a local PBX, but if so I can't parse the rest of it with any confidence. The number of digits is just odd.
Or, that might be the +972 country calling code prefix for Israel. If so, I'm tempted to parse it this way:
+972 50 000-1234
| | | |
| | | |
| | | |
| | | line number
| | |
| | exchange
| |
| area code
|
country code
I've answered, but I don't think this is an on-topic question for this site.
As mentioned in a comment, if a certain institution has several numbers beginning with +97250000, distributed around several departments, the last four numbers are telephone extension numbers. In your example it would be extension "1234".
- The number assigned within an organization to an individual telephone that extends the external telephone number. (NCI Thesaurus)
I think "suffix", rather than "postfix", is the word you want. In discussions of algorithms, the latter portion of any string is a suffix, irrespective of whether the string consists of digits, letters, or any other combination of symbols. See, for instance, the Wikipedia article on suffix trees. It sounds like it isn't really important that the strings you are working with are phone numbers, so I think you should go with the general term.
"Postfix", on the other hand, is an adjective describing a mathematical operator that goes after its operands.