php正则连接中文本程序
- $htm = "<a href='http://www.phpfensi.com'>test1</a><br />" .
- "<a href='http://www.phpfensi.com'>test2</a><br />" .
- "<a href='http://www.phpfensi.com'>test3</a><br />" .
- "<a href='http://www.phpfensi.com'>test4</a><br />" .
- "<a href='http://www.phpfensi.com'>test5</a><br />";
- echo $htm . "<br />";
- echo stripthetag($htm);
- function stripthetag($link) {
- return (preg_replace('@<[/!]*?[^<>]*?>@si', ' ', $link));
- }