What regular expression to clean up the phone number?

How it will look regular expression for cleaning a phone number of blanks, 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|\(|\)|-)/, "));
April 19th 20 at 12:14
1 answer
April 19th 20 at 12:16
Solution
'+7 (111) 111-11-111 '.replace(/\D/g, ")
// "711111111111"
p.s. ahh, I went the wrong way.
Instead of selecting spec.the characters just needed to choose number) - Mazie commented on April 19th 20 at 12:19
@Mazie, \D - NOT a number - katelin commented on April 19th 20 at 12:22

Find more questions by tags Regular expressionsJavaScript