How would I replace all span tags (and whatevers inside them) that have the class pagenum pncolor with an empty line. str_replace wouldn't work because the name is different for all of them, so I assume I'd use preg_replace, but I'm sure how that works.
<span class='pagenum pncolor'><a id='page_001' name='page_001'></a>001</span>
<p>Some text</p>
<span class='pagenum pncolor'><a id='page_130' name='page_130'></a>130</span>
<p>Some text</p>
<p>Some text</p>
<p>Some text</p>
<span class='pagenum pncolor'><a id='page_120' name='page_120'></a>120</span>
<p>Some text</p>
<span class='pagenum pncolor'><a id='page_100' name='page_100'></a>100</span>
<p>Some text</p>