Home  >  Article  >  Backend Development  >  求一正则,可以替换空白段落

求一正则,可以替换空白段落

WBOY
WBOYOriginal
2016-06-23 14:17:28890browse

可以替换诸如以下的空白段落:




(WHITESPACE)



 





(NEWLINE) 



(NEWLINE)

(NEWLINE) 



空白段中可能有回车,换行,缩进,空格等,怎么写正则

回复讨论(解决方案)

echo preg_replace('/\s+/','',$s);

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn