You can store regular expressions in two places during replication, in order format your source fields complexly. Global rules can be stored for formatting phone numbers in addition to adjusting individual source fields in the advanced Field Assignment Settings. These format settings will only be applied according to the special rules stored for the individual source fields. These formatting rules will only be applied to phone number fields, which you can configure from the Search Wizard.
Phone numbers will normally be converted automatically to an international standard dialing format (+49301234567) according to the rules that you have defined in the Location Settings.
To the extent that there are no phone numbers in your database, which can be formatted, you can use regular expressions to specify the formatting rules.
The search and replace feature, which works with regular expressions, will make the modifications. You can check the result of your entry, by entering a phone number in the Phone Number from Database field. The result from the regular expression will be displayed in the Result field. If the phone number does not match the search expression, the automatic formatting rule will be applied during replication. If a phone is formatted using a regular expression, the automatic formatting will not be used any longer.
Search for
Enter a regular expression according to which the phone number will be sought.
Tip: you will find the caret sign (^) at the top left of the German keyboard.
Here is a brief review of the allowed expressions:
Character | Description |
---|---|
^ | The beginning of the phone number. The expression, "^0", will find the zero only at the beginning of the phone number. |
^ | The caret (^) directly after the opening bracket ([) has a special meaning. It is used for excluding subsequent characters between the brackets. The expression, "[^0-8]", will only allow digits between zero and eight. |
$ | The dollar sign ($) indicates the end of the phone number. The expression, "152$" is only valid for phone numbers that end with 152. |
| | The pipe sign (|) allows the two characters on either side of it. The expression "8|9" will allow either an eight or a nine. |
. | The period (.) will allow all characters (or any digit). |
* | The asterisk (*) indicates that the character to its left must appear zero times or more often. |
+ | The plus sign (+) operates similar to the asterisk, except that the character to its left must appear at least once. |
? | The question mark (?) indicates that the character to its left must appear zero times or once. |
() | Parentheses indicate the expressions that will be available in the replacement field. |
[] | The brackets ([ and ]) indicate a set of characters that will be permitted at that position. |
Replace with
Enter the expression which should format the phone number for output.
\1 acts as a placeholder for the first expression indicated by parentheses for the Search For field.
\2 acts as the second placeholder, and so forth.
Examples
Effect | Search for | Replace with |
---|---|---|
Suppress all internal numbers having a three-digit extension. |
|
|
Add a country code for all phone numbers with more than three digits. |
|
+49\1 |
Add the phone system base number (03012345) to all internal numbers (with one to three digits) |
|
+493012345\1 |
Add the area code to all phone numbers that do not start with zero and have at least four digits (except internal numbers). |
|
+498151\1 |
Version MetaDirectory_3.5