Need quick help with regexp, to search a string for
blah blah blah price 4.000 blah blah
and assign 4.000 or whatever number comes after price to a variable.
Need quick help with regexp, to search a string for
blah blah blah price 4.000 blah blah
and assign 4.000 or whatever number comes after price to a variable.
preg_match('~price\s+(\S+)~', $input, $matches);
var_dump($matches);