I seem to be having a problem with a preg_match code, I am trying to get the decimal number from a string which should be something like ‘3.25’ but instead I get ‘1’
preg_match('/[0-9]+(?:\.[0-9]*)?/', '£3.25', $matches);
echo 'match: '.$matches[0];
prints “1”
gives
even on PHP 5.2 : http://codepad.viper-7.com/9nFhET