We need to completely remove anchor links with text inside using PHP. Then, we can use preg_replace() and removing all tags links with string completely by :
1 | preg_replace(‘/<a[^>]*>(.*)</a>/iU’,”, $text); |
Or seconds alternative is :
1 | preg_replace(‘#(<a.*?>).*?(</a>)#’, ”, $text); |
Now you can remove / delete all anchor links 🙂