I have recieved help over las couple of days with some regex coding. As I'm sure you're aware, with every breakthrough comes another question and I'm stuck on the following
$url = 'http://www.islandcosmetics.com/p/Vera-Wang-for-Men-Eau-De-Toilette-Spray-50ml.html'; $html = file_get_contents($url); preg_match('/<div class=\"padding9px\"><p?>(.+?)(\d+\.\d+)?<br \/><strong><span class=\"orange\">(.*)<\/span><\/strong><\/p><\/div>/', $html, $match); $out = $match;
This first one is in relation to trying to grab the "38.00" and no more for the RRP of a product. Where am I going wrong?
The second relates to this query... for the data within the brackets:
<td class="rrp"><strong>RRP</strong> £27.00 | <strong>SAVE</strong> £5.50</td>
For this web address, 'http://www.directcosmetics.com/detail.cfm?code=15362' how would I even begin to construct a regex to grab the "27.00" RRP and nothing more?
Regex scrambles my brain. Any help or ideas are greatly appreciated, honestly!