Home  >  Article  >  Backend Development  >  正则表达式,排除匹配:A结束标签

正则表达式,排除匹配:A结束标签

WBOY
WBOYOriginal
2016-06-23 14:00:011046browse

</?[^a][^>]*?>


我要保留所有的A标签(含,其他标签都不要(包括A中包含的标签),当前只能匹配到除  的标签,怎么样才可以再匹配  ,求解


回复讨论(解决方案)

php 提供了高效的方法,就像是对你量身定做的一样

$text= strip_tags($text, '');

额滴神。。。谢谢。。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn