do********@nowhere.com idiotically stated:
I need to replace everything between and including two snippets of
HTML code, for example:
</table></td></tr></table> klsdjff sd fsd fs fs df sdfs df sdf sd fsf
d <B><P> sfd sd fsdfs <br>
The </table></td></tr></table> and <br> parts will be the same. I
want to remove them and everything in between, including /n line
breaks.
Can't figure out the regex in PHP to do this.... any ideas?
use stristr().
First split up the whole string based on your first delimiter
(</table></td>....). take the end part of that result (which is now
everything after your first delim). Then split it up again, but use your
2nd delimiter (<br>). Use the beginning part of that result. you now have
a string that is between your two delimiters.
now use that string and stristr again on the original, full string, and
simply replace it with a empy space.
--
brian ... brian@cc
www.brianculler.com