I need RegEx to allow only the decimal values like 1.3, 1, 3.0, 1.453289. So far I have the regex /[^0-9](?=.*?.)/g
. But this RegEx is allowing values like 1a, 1.a45 and 1.343a. Note that it successfully replaces 2 or more decimal points.
Blancer.com Tutorials and projects
Freelance Projects, Design and Programming Tutorials
I need RegEx to allow only the decimal values like 1.3, 1, 3.0, 1.453289. So far I have the regex /[^0-9](?=.*?.)/g
. But this RegEx is allowing values like 1a, 1.a45 and 1.343a. Note that it successfully replaces 2 or more decimal points.