-- rada -- wrote:

supposedly converts Windows CRLF  to Unix LF:
$str =~ s/\r\n/\n/g;

Perl sed function.

There's no need to use a regex function unless you have a regex pattern to match. If you just need to remove the carriage returns, this will be two or three times faster:

$str = str_replace("\r", "", $str);

_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to