I would like to replace some text found in a particular div tag.
I managed to do this myself but had some limitations - cannot replace data found in a div tag when it is enclosed in another tag. eg: <div id="replace"><strong>5336<
If the <strong> tag was not there the below php function would have replaced the content with $appendContent.
$newContent = preg_replace('#<div id="replace">[^<]*</div>#', '<div id="replace">'.$appendContent."</div>", $oldContent);