|
Posted by usenet+2004 on 09/26/84 11:59
Puzzled:
> I'm developing under W2K with PHP 4.4, and using preg_replace() to
> massage text for output.
>
> But I can't explicitly find 2 adjacent EOL tokens using /\n{2}/
>
> It works if I specify chr(13).chr(10) in place of the \n, so is it
> that it doesn't interpret the \n in an os-friendly way, or do I have
> some config thing goofed up somewhere?
If your lines end in CR LF, as your tests suggest, then /\n{2}/ would
not match EOL.
Match CR LF with /\r\n/.
--
Jock
Navigation:
[Reply to this message]
|