This is the code that works, locally.
$str = <<<SSS
  <H1 class="prodname">Alison Raffaele Reality Base</H1>Foundation, Skintone 1 - Fairest 1 fl oz (30 m)<p class="tip"><table id="TblProdForkSellCopy" width="100%" border="0"><tr><td class="contenttd"><p>Get full, flawless coverage with this luxurious oil-free formula. Continually refreshes and re-hydrates your skin for 12+ hours - and guards against premature aging by deflecting damaging free radicals. </p></td></tr></table><p></p>
SSS;
preg_match("~</[hH]1>(.+?)<p~",$str,$name)  ;
var_dump($name) ;
But doesn't work when the page is actually parsed. Why ? Link to the page . 
Is there anything wrong with my code. I have copy pasted exactly from the page.
Oh and by doesn't work I mean it matches too much. When matched locally the first '<p' isn't included , but in my actual script (when the page is downloaded from the net) it includes the '<p' tag for some reason.
Thanks
 
    