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

WBOY
Release: 2016-06-13 11:52:44
Original
1025 people have browsed it

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

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


我要保留所有的A标签(含,其他标签都不要(包括A中包含的标签),当前只能匹配到除  的标签,怎么样才可以再匹配  ,求解
------解决方案--------------------
php 提供了高效的方法,就像是对你量身定做的一样

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

Related labels:
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!