I have a string like so:
(999.08) – (1025.67)
I need to be able to find the range between these two values as a floting point even if they are negative values so (-999.08) – (-1025.67) would also be in scope.
Assume i would need to use a regex and join the two in some sort of array?
From looking over everyone else’s answers, I can’t tell if any of them deal with negative numbers properly. I’ll throw this in the ring in case anyone needs it.
demo: http://jsbin.com/oseba4/edit