|
Posted by Puzzled on 12/14/97 11:59
usenet+2004@john.dunlop.name wrote:
>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/.
Thanks for the response. So you're saying that php's perl lib doesn't
handle it, and I need to do a pre-processing pass on the buffer to
convert the DOS EOLs myself?
Navigation:
[Reply to this message]
|