I have the below piece of html which is PHP generated, I would like to be able to remove everything between these two pieces of strings <p
and p>
<li class="level1 nav-2-1 first">
<a href="http://dev.example.com/women/"><span>Women <p style="color:#73bf43;display: inline-block;font-size: 10px;">- NEW</p></span></a>
</li>
<li class="level1 nav-2-2">
<a href="http://dev.example.com/men"><span>Men<p style="color: #73bf43; display: inline-block; font-size: 10px;">- <strong>NEW</strong></p></span></a>
</li>
So far I've tried variations of the below:
preg_replace('/<.*?\p>|\s*/', '', $_input)
Where $_input
is the string of html above.