I would like to remove anchor tag using php regex from the given string if it's not inside of another tag.
Input:
Hi Hello <a href="#">World</a>. This is <div class="some">testing <a href="#">content</a>. some more content</div>
Output:
Hi Hello. This is <div class="some">testing <a href="#">content</a>. some more content</div>
Thanks in advance.