the regular express /\D/g
identifies all non numeric characters and the following code will replace the letter 'q' and decimal '.' in str
and result in 10025
var str = "10q0.25";
var result = str.replace(/\D/g, '');
How can the regex be changed so as to allow the decimal point also and resulting in 100.25
?