I have the following two types of text:
Type one:
<div class="meta-name">Corporate Officers</div>
<div class="meta-data"><table border="0" cellspacing="0" cellpadding="0" width="171">
<col width="171"></col>
<tbody>
<tr height="19">
<td width="171" height="19">Officer One</td>
</tr>
</tbody>
</table>
</div>
</div>
Type two:
<div class="meta-name">Corporate Officers</div>
<div class="meta-data">Officer Two</div>
</div>
<pre>
I'm using php with preg_match_all
. I need a single expression that will return Officer One and Officer Two from the above. I'm using Corporate Officers< /div>
as the first anchor and< /div>
as the second, but I can't find Keith Dennis inside all that table gibberish.
How do I return text between anchor1 and anchor2 while ignoring all text inside any brackets <>
between?
I saw these threads but wasn't able to make their solutions work for me: RegEx: extract everything until X where X is not between two braces