javascript remove all but numbers
snippet in javascript

javascript remove all but numbers

user9249

string.replace(/[^0-9]/g, '');

js remove all non numeric from string

user2339

numString = myString.replace(/\D/g,'');