Ben bu verileri yakalarken sorun yaşıyorum:
<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.
Ben could muhtemelen döngüler ve dize eşleşmeleri kullanarak bunu düzenli ifadeler kullanmayı tercih ederler.
Ayrıca, PHP regex olmayan eşleşen gruplar için sözdizimi bilmek istiyorum.
Herhangi bir yardım büyük mutluluk duyacağız!