I'm using preg_match_all
to match the text inside a <td>
that is also between <strong>
tags. But i have a problem, the html code has newlines in it; this is the html:
<td
class="vcenter text-center">
<strong>Match This </strong></td>
For now i'm using this pattern to get the text:
!<td\nclass="vcenter text-center">\n<strong>(.*?)<\/strong><\/td>!
This does get the text but it won't work if that newline(in the td
tag) disappears from the html code. What can i do in this situation?
P.S: I'm using curl
to get that html(and i don't want to add an extra class like simple_html_dom
:-s).
Thank you!