1 | $str=preg_replace("/\s+/", " ", $str); //过滤多余回车 |
清除空格,换行
1 | function DeleteHtml($str){ |
过滤HTML属性
1 | //过滤所有html标签的属性的正则表达式: |
[[PHP 常用正则表达式]]
[[Linux 《正则表达式基础入门》实验报告]]
Yohann's blog
1 | $str=preg_replace("/\s+/", " ", $str); //过滤多余回车 |
1 | function DeleteHtml($str){ |
1 | //过滤所有html标签的属性的正则表达式: |
[[PHP 常用正则表达式]]
[[Linux 《正则表达式基础入门》实验报告]]