To perform this task | Use this rule | Notes |
Match only this exact phone number 1555799232. | In the Match field: ^1555799232$ | Match: 1555799232 |
Match either of these phone numbers: 1555799232 or 1555799233. | In the Match field: ^1555799232$|^1555799233$ | Match: 1555799232 |
Match three numbers which differ only by the last digit: 1555799230, 1555799231, 1555799232 | In the Match field: ^155579923[0-2]$ | Match: 1555799230
Match: 1555799231
Not a match: 1555799235
|
Match all phone numbers starting with 155 | In the Match field: ^155\d* | The rule matches all character groups that start with 155, regardless of length and whether they include letters or special characters. |
Match phone numbers starting with 1, 2 or 3. | In the Match field: ^[123] | Match: 1555799232
For the given rule, matches include any strings starting with 1, 2, or three, including 1555799232.
|
Match only phone numbers which include digits. | In the Match field: ^\d*$ | Match: 1555799232
Not a match: +1555799232
|
Match phone numbers starting with 15, 25, or 35. | In the Match field: ^[123][5] | Match: 1555799232 |
Match phone numbers starting with 15, 25 or 35. | In the Match field: ^(1|2|3)(5) | Match: 1555799232
Match: 2555799232
Match: 3555799232
Not a match: 4555799232
|
Match phone numbers starting with 770 and add 9 to the number. | In the Match field: ^[770]
In the Replace field: 9$0
| Match: 7705555555
Result: 97705555555
|
Match phone numbers starting with + and not followed by 57; substitute 0005 for the plus sign. | In the Match field: ^\+(?!57)
In the Replace field: 0005
| Match: +5865555555
Result: 00055865555555
The number matches the pattern. The plus sign (+) is replaced by 0005. The final formatted number is 00055865555555.
Remember to use the escape character backslash (\) to escape the plus sign (+) so it is used in pattern matching and not evaluated as part of the expression.
|
Match phone numbers not starting with 57 and add a plus sign (+) to the start of the phone number. | In the Match field: ^(?!57)[\d]{7,}
In the Replace field: +$0
| Match: 5865555555
Result: +5865555555
The Match field matches 5865555555, and the Replace field adds a plus sign (+) to the first position.
|
Match phone numbers starting with +571 and replace +571 with 0. | In the Match field: ^\+571([\d]{3,})
In the Replace field: 0$1
| Match: +57165555555
Result: 065555555
The Match field matches +57165555555, and the Replace field substitutes 0 for +571.
|
Match phone numbers starting with +57 but not +571 and not +573. Replace +57 with 005. | In the Match field: ^\+57(?!1|3)([\d]{3,})
In the Replace field: 005$1
| Match: +5742515433
Result: 00542515433
The Match field matches +5742515433 and the Replace field substitutes 005 for +57.
|