Global Warming Trend Script

This function is in my dashboard…

// strip trailing units from a measurement
// i.e. '30.01 in. Hg' becomes '30.01'
function strip_units ($data) {
  preg_match('/([\d\.\+\-]+)/',$data,$t);
  return $t[1];
}

I think this might be what is needed?

Jack