note 52615 deleted from function.preg-replace by didou
| From: | didou@php.net | Date: | Sun, 23 Apr 2006 22:51:12 +0000 |
| Subject: | note 52615 deleted from function.preg-replace by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-109229@lists.php.net to get a copy of this message | ||
Note Submitter: Diogo Custodio
----
To strip blank lines (blank, with tab or whitespaces) from a string:
<?php
$text=preg_replace("/[\r\n]+[\s\t]*[\r\n]+/","\n",$text);
?>