I have a table:
<table class="table_class" >
<tr>
<td>key</td>
<td>value</td>
</tr>
</table>
The table may have any count of <tr>
I have regexp:
<table class="table_class">(<tr.*?><td>(.*?)</td><td>(.*?)</td></tr>){1,}</table>
But matches array contains only last match.
Just (<tr.*?><td>(.*?)</td><td>(.*?)</td></tr>)
I can not do, because other table will may be.
Before apply preg_match_all I delete whitespaces. How do this? Thanks!
UPD: example with a few tables
<table>
<tr>
<td>key</td>
<td>value</td>
</tr>
</table>
<table class="table_class" >
<tr>
<td>key</td>
<td>value</td>
</tr>
</table>
yet, I will want to know why my regexp match only last <tr>
))