I am using JavaScript and Regex to search for a known phone number in a given piece of text and then replace it with some other number. Although I know the phone number but I am not certain of the phone number format used in the given text. The text could be in any language.

For instance, I need to find the phone number +14101111111 and replace it with +14102222222 in the following string:

`Call me at +1-(410)-111-1111.`

Preferably I want to replace the old number with the new number keeping the same format as the old number. So the result string should look like:

`Call me at +1-(410)-222-2222.`

I am using the following regex for searching the number in the string. I split up the phone number and apply the regex after every single number. 

```
([&;nbsp_\.\(\)\+\-~\*•–\s]*)

```

So the full regex, in this case, will look like:

```
/1([&;nbsp_\.\(\)\+\-~\*•–\s]*)4([&;nbsp_\.\(\)\+\-~\*•–\s]*)1([&;nbsp_\.\(\)\+\-~\*•–\s]*)0([&;nbsp_\.\(\)\+\-~\*•–\s]*)1([&;nbsp_\.\(\)\+\-~\*•–\s]*)1([&;nbsp_\.\(\)\+\-~\*•–\s]*)1([&;nbsp_\.\(\)\+\-~\*•–\s]*)1([&;nbsp_\.\(\)\+\-~\*•–\s]*)1([&;nbsp_\.\(\)\+\-~\*•–\s]*)1([&;nbsp_\.\(\)\+\-~\*•–\s]*)1/g

```

This does match the number fine and I can capture the groups. 

I will use this method on webpages.

Question:
What are the caveats of using this method?
Can you think of a better approach?
How well will this work with multi-lingual webpages?

Thanks!