in reply to Identifying and parsing numbers

You want to match:
* optional plus/minus
* numeric value which can be either
   * digits optionally followed by a decimal point and more digits
   * a decimal point followed by digits
* one or two characters

I think the following regex should meet these conditions:
/(\-?(?:\d+(?:\.\d+)?)|(?:\.\d+))([a-z]{1,2})/g

The issue that makes this ones non-trivial is that the decimal point and digits are either a required element or an optional element depending on the presence of a whole number.

My regex should return a list containing value/unit pairs... If you want to exactly match and retreive you should use:
/^([+\-]?(?:\d+(?:\.\d+)?)|(?:\.\d+))([a-z]{1,2})$/

That is either a two-element list with the value and the unit, or an empty list.