I currently have this…
sanitizeNumber = function ( dirtyNumber ){
// remove any non-digits from the number
return dirtyNumber.replace(/[^\d.]/g, "");
}
.. but it appears to be allowing decimal points through.
How can I remove absolutely everything except for the digits from 0 to 9?
You shoud remove the
.after the\d