【www.gdgbn.com--php正则表达式】

 代码如下

   $htm = "test1
" .
          "test2
" .
          "test3
" .
          "test4
" .
          "test5
";

   echo $htm . "
";
   echo stripthetag($htm);

function stripthetag($link) {

   return (preg_replace("@<[/!]*?[^<>]*?>@si", " ", $link));
}

 

本文来源:http://www.gdgbn.com/jiaocheng/26011/