I'm trying to get a regex working that will replace everything except for numbers and a decimal point (easy). The tricky part: the decimal point is optional but, if present, must be trailed by a further number.
So:
.10 => 10
10. => 10
10.- => 10
1.0 => 1.0
I'm not quite sure how to define the "except numbers followed by an optional decimal point but mandatory number after the optional decimal point" bit :)
Thanks!