Mask Phone Number

Standardization Definition

Mask Phone Number
Description

The Mask Phone Number standardization definition replaces every alphanumeric character except the last four alphanumeric characters of the base number with the * character.

Examples Input Output
0119421496 *** ***1496
0432 676714, Attn: J. J. Marcos **** **6714
0165 40077 UFF. 0165 **** *0077 ****
+39 02 764401 *** ** **4401
Remarks

This definition is designed to handle single phone numbers in a valid format for the country of the locale. Invalid input may not be masked. There may be some format changes such as parenthesis removal and token separation that occurs prior to masking. Additionally, punctuation, symbols, and spaces defined by the following Unicode general categories are removed from the base number:

  • Punctuation (P)
  • Symbol (S)
  • Spaces (Z)

Additional information that is not part of the actual phone number is removed.