Re: Another preg question
| From: | Al | Date: | Fri, 13 Feb 2004 22:28:13 +0000 |
| Subject: | Re: Another preg question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-177659@lists.php.net to get a copy of this message | ||
Didn't work. I'm beginning to think the problem is more involved. I am going to break out just the essentials of the code that is involved and debug just it.
Thanks....
Matt Matijevich wrote:
<snip> Next, I want to remove excessive CR/LF, [i.e. more than 2]$text= preg_replace("/\n\n+/", "\n\n", $text);// remove excess This doesn't seem to do anything. </snip> not 100% sure this is right but give it a try$text = preg_replace("/\n\n+|\n\r[\n\r]+|\r\r+/", "\n\n", $text);