Remove anchors from text

后端 未结 7 1650
醉酒成梦
醉酒成梦 2020-12-10 15:01

I need to remove anchor tags from some text, and can\'t seem to be able to do it using regex.
Just the anchor tags, not their content.
For instance,

7条回答
  •  醉酒成梦
    2020-12-10 15:29

    This question has been answered already but I thought I would add my solution to the mix. I like this better than the accepted solution because its a bit more to the point.

    $content = 
        preg_replace(array('""', '""'), array('',''), $content);
    

提交回复
热议问题