Regex to find integers and decimals in string
===

I have a string like:

    $str1 = "12 ounces";
    $str2 = "1.5 ounces chopped;

I'd like to get the amount from the string whether it is a decimal or not (12 or 1.5), and then grab the immediately preceding measurement (ounces).

I was able to use a pretty rudimentary regex to grab the measurement, but getting the decimal/integer has been giving me problems.

Thanks for your help!