linux下的制表符和换行符用\t\t和\n\n表示 例如: $str = " aa bb cc " echo preg_replace("/\n\n|\r\r/i","",$str); 输出:aabbcc windows下用\n和\t表示 相关文章: