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? Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/187263-still-stuck/#findComment-988906 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.