I have a simple question for regex gurus. And yes... I did try several different variations of the regex before posting here. Forgive my regex ignorance. This is targeting PHP.
I have the following HTML:
<div>
<h4>
<a href="somelink.html">some text blah</a>
</h4>
I need this text<br />I need this text too.<br />
</div>
<div>
<h4>
<a href="somelink.html">some text blah</a>
</h4>
I need this text<br />I need this text too.<br />
</div>
<div>
<h4>
<a href="somelink.html">some text blah</a>
</h4>
I need this text<br />I need this text too.<br />
</div>
What I tried that seemed most likely to work:
preg_match_all('/<div><h4><a href=".*">.*<\/a><\/h4>(.*)<br \/>(.*)<br \/>/', $haystack, $result);
The above returns nothing.
So then I tried this and I got the first group to match, but I have not been able to get the second.
preg_match_all('/<div><h4><a href=".*">.*<\/a><\/h4>(.*)<br \/>/', $haystack, $result);
Thank you!