Regex that I tried:
[+1]?[^0-9],
[+1{1}]?[^0-9],
[^+1]?[^0-9]+ – this allows all 1‘s
Sample number :
+1 (634) 841-4313
target :
6348414313
it should remove characters:
+1 () -
my regex removes :
+1 () 1-1
Can any of you help me here with this?
>Solution :
^\+1\D*|\D
This will remove "+1" at the start of the string, then any non-numeric character following it
Given "+1 (987) 6543-2101"
Returns "98765432101"