I'm hoping someone out there can help me with my regular expressions. 🙂
What I'm trying to do is strip all "div" and "table" elements (along with their content) from a string.
What I have so far is this:
$string = preg_replace('/<div>.*<\/div>/', '', $string);
$string = preg_replace('/<table>.*<\/table>/', '', $string);
However, I'm not quite sure how to make it strip/match a few more HTML variables. For example, the following aren't getting stripped because they don't start with <table> or <div> exactly.
<table border="0" cellpadding="0" cellspacing="0">
<div style="font-size:12px;">
This is probably a really easy fix. Thanks for taking the time to read this. 🙂