Matching Product Prices from an HTML text
I'm trying a simple regex on a string for pricing information, but my preg_match_all is simply not finding what it should. I'm looking for instance of e.g. $**.** or £**.** or sometimes the currency symbol might be encoded as an HTML entity e.g. for GBP £ or £ Is there an issue with using preg_match_all to find html entities? Here's what I'm trying: $price = preg_match_all( '#(?:\$|\£|\€|\£|\£)(\d+(?:\.\d+)?)#', $string, $matches ); But I get: Unknown modifier '1' Here is some obvious errors: 1) preg_match_all() expects at least 3 parameters, so it has to be preg_match_all( '#(?:\$|\£|\€|\£|\£