fork download
  1. <?
  2.  
  3. $string = 'the price is <tag>&#163;10.00</tag>';
  4.  
  5. $price = preg_match('#(?:\$|\£|\€|\&pound;|\&\#163;)(\d+(?:\.\d+)?)#', $string);
  6.  
  7. echo "the price is $price";
  8.  
  9. ?>
Success #stdin #stdout 0.02s 13064KB
stdin
Standard input is empty
stdout
the price is 1