I am trying to extract phone number from text my problem is that my regex currently matches the bold parts of the
+00 000 000 0000
+00.000.000.0000
+00-000-000-0000
+000000000000
but it should not be matched become it starts with a + and the country code (+00) doesn't exist.
My current regex is:
((?:00|\+)
(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)|\((?:00|\+)
(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)\))?
(?:(?:[-\.\s]??\d)|(?:[-\.\s]?\(?\d\)?)){4,11}
How can I fix it? I would be grateful for support.
EDIT Added a regex101 link with some test phone numbers and the regex https://regex101.com/r/lLuP1E/1