Consider the following string:
var string="0px 0px 4.5px";
Now let's say I want to extract the numbers from that string. I will use the following regex:
var numbers=string.match(/\d+/g);
But what I get is:
["0","0","4"]
So you see that 4.5 was turned into an integer.So my question is how can I change the above regex to get floating numbers from a string