Jump to content

a table or a string inside a td?


shedokan

Recommended Posts

I have this regex:

preg_match_all('|<tr([^<>]*)><td>([^&]*)([^<>]*)</td><td([^>]*)>([^&]*)([^<>]*)</td><td([^>]*)>([^&]*)([^<>]*)</td><td([^>]*)>([^&]*)([^<>]*)</td></td></tr>|', $table, $stats, PREG_SET_ORDER);

 

it needs to allow a table inside the first <td>([^&]*)([^<>]*)</td> but I don't know how to do that.

 

please help me.

 

thanks.

Link to comment
https://forums.phpfreaks.com/topic/163707-a-table-or-a-string-inside-a-td/
Share on other sites

it is looking for rows like this:

<tr bgcolor=#402020><td><table cellpadding=0 cellspacing=0 border=0 width=99%><tr><td>06/25/09 Thu*</td></tr></table></td><td align=right>2 </td><td align=right>1 </td><td align=right>0 </td></td></tr>

 

but they can sometimes be like this, without the table:

<tr bgcolor=#402020><td>06/25/09 Thu*</td><td align=right>2 </td><td align=right>1 </td><td align=right>0 </td></td></tr>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.