Answers for "remove string from number 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

string to number javascript & remove text

var p = $( "p" ).last();
var offset = p.offset();
p.html( "left: " + offset.left + ", top: " + offset.top );
Posted by: Guest on October-13-2021
0

string to number javascript & remove text

str = str.replace(/[^0-9\.]+/g, "");
Posted by: Guest on October-13-2021
0

string to number javascript & remove text

var str = "data-123";
str = str.replace("data-", "");
Posted by: Guest on October-13-2021

Code answers related to "remove string from number javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language