Greetings All!
I'm trying to take some HTML and chop out all tables within it, placing those tables within an array.
I wrote this in an attempt to match everything between two table tags:
eregi("(<table)(.*)(</table>)",$code,$tables_found);
However, I need to modify this so that it DOES NOT kick back to me the table tag modifiers and close-tag.
Example of what it's currently doing:
When fed:
$code="<table cellpadding=1><tr><td>Test</td></tr></table>";
It kicks back:
cellpadding=1><tr><td>TEST</td></tr>
I need to get rid of the "cellpadding=1>". How can I adjust my eregi statement so that it starts its pattern match with <table and anything between that and >.... and then ends its match with </table>?
Thanks!
-= Dave =-