Reply to Re: the perl regexp routines don't decode \n?

Your name:

Reply:


Posted by Puzzled on 12/16/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?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация