I'm having trouble capturing this data:
<tr>
<td><span class="bodytext"><b>Contact:</b><b></b></span><span style='font-size:10.0pt;font-family:Verdana;
mso-bidi-font-family:Arial'><b> </b>
<span class="bodytext">John Doe</span>
</span></td>
</tr>
<tr>
<td><span class="bodytext">PO Box 2112</span></td>
</tr>
<tr>
<td><span class="bodytext"></span></td>
</tr>
<!--*********************************************************
-->
<tr>
<td><span class="bodytext"></span></td>
</tr>
<tr>
<td><span class="bodytext">JOHAN</span> NSW 9700</td>
</tr>
<tr>
<td><strong>Phone:</strong>
02 9999 9999
</td>
</tr>
Basically, I want to grab everything after "Contact:" and before "Phone:" minus the HTML; however these two designations may not always exist so I need to really grab everything between the two colons (:) that isn't located inside a HTML tag.
The number of <span class="bodytext">***data***</span>
may actually vary so I need some sort of loop for matching these.
I prefer to use regular expressions as I could probably do this using loops and string matches.
Also, I'd like to know the syntax for non-matching groups in PHP regex.
Any help would be greatly appreciated!