通过本文主要向大家介绍了正则过滤html,js正则 过滤html,html正则表达式,正则匹配html,正则表达式匹配html等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
如:
字符串<div style="float:left" id="ab">123213</div><div class="a123">21314423</div>
不匹配<div class="a123">……</div>的内容
写这个例子可以用
<[a-zA-Z0-9][^>]+?id=[^>]+?>.*?</div>
匹配
上一个php例子:
</div> </div>
字符串<div style="float:left" id="ab">123213</div><div class="a123">21314423</div>
不匹配<div class="a123">……</div>的内容
写这个例子可以用
<[a-zA-Z0-9][^>]+?id=[^>]+?>.*?</div>
匹配
上一个php例子:
</div> </div>