I have an input that can gets float numbers for example 1.56
I want to replace all strings and other characters except number and .
I used this code. It removes all strings and special chars. But this time I can not use . for float number.
const convertedValue = input.replace(/\D+/g, '');
Can anybody help me to find a way? Thanks