Consider a non-DOM scenario where you\'d want to remove all non-numeric characters from a string using JavaScript/ECMAScript. Any characters that are in range 0 - 9
0 - 9
If you need this to leave the dot for float numbers, use this
var s = "-12345.50 €".replace(/[^\d.-]/g, ''); // gives "-12345.50"