in reply to Re^2: Extracting HTML content between the h tags
in thread Extracting HTML content between the h tags

According to your HTML preceding-sibling for hr will be div tag but not p tag... So this code will find all ps after last h2:
$p->findnodes('//h2[4]/following-sibling::p');
Or (more flexible):
$p->findnodes('//h2[last()]/following-sibling::p');

Replies are listed 'Best First'.
Re^4: Extracting HTML content between the h tags
by vagabonding electron (Curate) on Aug 06, 2012 at 15:31 UTC
    Thank you very much!