摘要:
\s 匹配任何空白字符,包括空格、制表符、换页符等等 $str = "i am book\n\n\n\n\nmoth"; //去除所有的 echo preg_replace("/[\s]{2,}/","",$str); //去除多余的,保留一个 echo preg_replace("/([\s]{2,})/","\\1",$str); 阅读全文
posted @ 2010-11-10 10:57
Dufe王彬
阅读(149)
评论(0)
推荐(0)
浙公网安备 33010602011771号