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

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

WBOY
Release: 2016-06-23 14:00:01
Original
1140 people have browsed it

</?[^a][^>]*?>
Copy after login


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


回复讨论(解决方案)

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

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

额滴神。。。谢谢。。

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template