Phone Normalization Rules
Topic Last Modified: 2010-12-14
In Lync Server 2010, the normalization rules are applied after the number is received from the Address Book Service. The Address Book Service removes any white space and non-mandatory characters from the phone number before applying the normalization rule. Examples of non-mandatory characters: !, @, ., - and *.
This processing order simplifies the normalization rules because there is no longer a need to account for the possibility of white space or non-mandatory characters in the phone number. The change in the way that numbers are formatted prior to normalization was done to be consistent with the method used for normalization in other parts of the Lync Server product. The processing order also simplifies the normalization rules that are required to properly format the number when it is presented to the client.
In prior releases, your regex rules for normalization might have looked like the following:
The previous rule can be rewritten in Lync Server as the following because there is not any white space or non-mandatory characters to find:
The new processing method does have the potential to render some normalization rules that worked in previous versions of Office Communications Server to fail. Because the rule is now applied after whitespace and other specific characters are removed, a regex expression that anticipates these specific characters no longer functions as expected. For example:
This expressions fails because the ‘-‘ character has been removed by pre-processing. The match for ()- is no longer able to match the expected character in the input string. To resolve the previous regex to work with the new pre-processed format, you can now simplify it to the following:
The new regex rule simply matches ten digits.