Say I have the following text
..(content)............. <A HREF="http://foo.com/content" >blah blah blah </A> ...(continue content)...
I want to delete the link and I want to delete the tag (while keeping the text in between). How do I do this with a regular expression (since the URLs will all be different)
This will remove all tags:
preg_replace("/<.*?>/", "", $string);
This will remove just the
preg_replace("/<\\/?a(\\s+.*?>|>)/", "", $string);