Results 1 to 2 of 2
Apr 1, 2007, 04:49 #1
Muliline preg_replace help needed
I have a string of HTML from which I'd like to remove a table and image link. The image and link are arbitrary, as are the attributes of the table itself. Additionally, there may or may not exist such tags as *th, *thead or *tbody within the table. I believe that preg_replace() is the proper solution, but as there are too many circumstances to allow for, I'm doing more reading than anything...and getting more confused as I go...
Can someone reveal the pattern for removing the following (frameworked) HTML? The pattern will always be removing a table (and a following *br), so the basic table tags will be present, however, the tags will have arbitrary attributes, and the *th, *thead and *tbody tags may be arbitrarily present as well. Finally, the markup will be found on more than a single line.
<table><tr><td><a><img /></a></td></tr></table><br />
Apr 1, 2007, 05:17 #2
#<table>.*?<a .*?><img .*?/></a>.*?</table><br />#isSaul