Answer the question
In order to leave comments, you need to log in
What regular expression to clear a phone number?
What would a regular expression look like to strip a phone number from spaces, parentheses, and hyphens?
+7 (111) 111-11-111
This does not help https://regex101.com/r/DM2Nyg/2/
console.log("+7 (111) 111-11-111".replace(/(\s|\(|\)|-)/, ''));
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question