Phone Number Normalization Rule Regular Expressions

The pattern-matching notation of regular expressions makes it possible to quickly parse large amounts of text to find specific character patterns; to extract, edit, replace, or delete text substrings; or, to add the extracted strings to a collection in order to generate a report. You use .NET regular expressions to specify the phone pattern and the translation pattern as follows:

  • Phone pattern regular expression. This consists of designators and variables that represent specific sets of numbers. For example, the phone pattern regular expression of ^9(\d{7})$ describes phone numbers that consist of the number 9 followed by any seven digits.

  • Translation pattern regular expression. This consists of the + symbol, numbers, and the $ symbol. The $ symbol captures the items of the phone pattern regular expression that are included inside the parenthesis. The number following the $ symbol must be less than or equal to the total number of captures specified by the phone pattern regular expression.

    For example, the translation pattern regular expression of +1425$1 describes a translation that adds a prefix of +1425 to the captures (the phone pattern items in parenthesis). If the phone pattern regular express is ^9(\d{3})(\d{4})$ (containing two captures), the number following the $ sign can only be 1 or 2.

The following table shows sample normalization rules and the corresponding values for the rule name, description, phone pattern, and translation pattern.

Rule Name


Phone Pattern

Translation Pattern



Translates 4-digit extensions



1234 is translated to +14255551234


Translates 5-digit extensions



81234 is translated to +14255581234


Translates 7-digit numbers to Redmond local number



5551212 is translated to +14255551212


Translates 7-digit numbers to Dallas local number



5551212 is translated to +19725551212


Translates 10-digit numbers in US



2065551212 is translated to +12065551212


Translates numbers with LD prefix in US



12145551212 is translated to +12145551212


Translates numbers with international prefix in US



011914412345678 is translated to +914412345678


Translates 0 to Redmond Operator



0 is translated to +14255551212


Translates numbers with on-net prefix (6) and Redmond site code (222)



62221234 is translated to +14255551234


Translates numbers with on-net prefix (6) and NY site code (333)



63331234 is translated to +12025551234


Translates numbers with on-net prefix (6) and Dallas site code (444)



64441234 is translated to +19725551234

Learn More Online

Click to expand or collapse

For details about specifying a phone number normalization rule, how to use .NET regular expressions to create these rules, and additional sample rules, see the Enterprise Voice documentation in the Office Communications Server Technical Library.

Share Facebook Facebook Twitter Twitter Email Email

Was this information helpful?

Great! Any other feedback?

How can we improve it?

Thank you for your feedback!