$str='这篇文章分享的内容,主要讲解的是在<a href="https://www.mdaima.com">php</a>中,如何使用正则表达式去掉超链接?' $str=preg_replace("(<a [^>]*>|</a>)","",$str);