Im want to remove all but the float in this sting:
string = "1 south african rand is 0.11044"
Im doing it like this:
reg = /[^\d+.\d+]/g
console.log string.replace(reg, '')
that logs
10.11044
that is wrong, I want only the xxxx.xxxxx part. 1 is not a float so it should not be part of this?
How should I chage it?