Answers for "javascript remove all but numbers from string"

3

javascript remove all but numbers

string.replace(/[^0-9]/g, '');
Posted by: Guest on December-10-2020
2

js remove all non numeric from string

numString = myString.replace(/\D/g,'');
Posted by: Guest on October-24-2020
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

Code answers related to "javascript remove all but numbers from string"

Code answers related to "Javascript"

Browse Popular Code Answers by Language