razorsese Posted February 2, 2013 Share Posted February 2, 2013 How I can replace the white line whit something else Example: simple sentence simple sentence simple sentence simple sentence simple sentence simple sentence to something like this $replaced simple sentence simple sentence simple sentence $replaced $replaced simple sentence simple sentence simple sentence $replaced Quote Link to comment https://forums.phpfreaks.com/topic/273955-preg-replace-help/ Share on other sites More sharing options...
requinix Posted February 2, 2013 Share Posted February 2, 2013 Easiest method? Stick a $replaced at the beginning, a $replaced at the end, and replace an empty line (probably two consecutive newline sequences) with a $replaced+two newlines+$replaced. Quote Link to comment https://forums.phpfreaks.com/topic/273955-preg-replace-help/#findComment-1409795 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.