javascript remove all but numbers

JavaScript
string.replace(/[^0-9]/g, '');numString = myString.replace(/\D/g,'');
Source

Also in JavaScript: