Answers for "remove all characters except numbers javascript"

1

javascript remove non numeric chars from string keep dot

var s = "-12345.50 €".replace(/[^\d.-]/g, ''); // gives "-12345.50"
Posted by: Guest on February-21-2020
0

javascript replace all characters except letters and numbers

str.replace(/[^A-Za-z0-9]/g, "-")
Posted by: Guest on June-09-2021

Code answers related to "remove all characters except numbers javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language