I'm not sure how to explain this, so I'll show it on my code.
<a href="link.php">First</a> and
<a href="link.php" class="delete">Second</a> and
<a href="link.php">Third</a>
how can I delete opening <a href="link.php" class="delete"> and closing </a> but not the rest?
I'm asking for preg_replace(); and I'm not looking for DomDocument or others methods to do it. I just want to see example on preg_replace();
how is it achievable?