Hello
I have this problem
varialble $list contains this
Code:
<tr> <td><FONT COLOR="#336699"><B><b>anonymous@host2.com</b></font></b></td>
<td><a href="editquota.html?acct=ftp"><img src="/frontend/test/images/quota.jpg" border=0></a></td><td colspan=2><img src="/frontend/test/images/mainacct.jpg"></td>
</tr>
<tr> <td><FONT COLOR="#336699"><B><b>ftp3@host1.com</b></font></b></td>
<td><a href="editquota.html?acct=ftp"><img src="/frontend/test/images/quota.jpg" border=0></a></td><td colspan=2><img src="/frontend/test/images/mainacct.jpg"></td>
</tr>
<tr> <td><FONT COLOR="#336699"><B><b>ftp2@host2.com</b></font></b></td>
<td><a href="editquota.html?acct=ftp"><img src="/frontend/test/images/quota.jpg" border=0></a></td><td colspan=2><img src="/frontend/test/images/mainacct.jpg"></td>
</tr>
<tr> <td><FONT COLOR="#336699"><B><b>ftp1@host1.com</b></font></b></td>
<td><a href="editquota.html?acct=ftp"><img src="/frontend/test/images/quota.jpg" border=0></a></td><td colspan=2><img src="/frontend/test/images/mainacct.jpg"></td>
</tr>
Before echo $list , I wish to remove from $list all table rows (from <tr> to </tr>) which contain "host2.com" . How to do that ? I tried using preg_match or preg_match_all but I am not able to find a solution .
Any help please ?
Thank you