PHP, use regex to remove links but keep anchor text?

Jackie

New member
Hi,

I'm still a newbie PHP coder but am making a wordpress plugin that removes all links in a post. The way I parse for the links right now it by using simple string manipulation but I have heard that regex would be a far more flexible than this. So my question:

How can I use regex to identify and remove the anchor tags and hyperlink, but keep the anchor text intact?

Any help would be appreciated
 
Back
Top