i am hvaing a challenge trying to do this reliably for all possible strings.
Here are the possible values of $str:
There is a new $66 price target
There is a new $105.20 price target
There is a new $25.20 price target
preg_match('/\$([0-9]+[\.]*[0-9]*)/', $str, $match); $dollar_amount = $match;
will be probably the most suitable one