stuckwithcode Posted January 5, 2010 Share Posted January 5, 2010 Hello I have this code below that converts all types of line breaks to \r\n. $text = preg_replace('#[\r\n]+#', "\n", $text); But if there are 5 line breaks it groups them to 1. I want to keep the number of line breaks the same, just make them all the same format. If I remove the + it seems to double the actual number of line breaks. Can anyone help? Link to comment https://forums.phpfreaks.com/topic/187263-still-stuck/ Share on other sites More sharing options...
premiso Posted January 5, 2010 Share Posted January 5, 2010 Please see: http://www.phpfreaks.com/forums/index.php/topic,282865.msg1341141.html#new For the solution. Link to comment https://forums.phpfreaks.com/topic/187263-still-stuck/#findComment-988906 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.