Jump to content


Photo

preg replace help


  • Please log in to reply
1 reply to this topic

#1 razorsese

razorsese

    Advanced Member

  • Members
  • PipPipPip
  • 66 posts

Posted 02 February 2013 - 03:12 PM

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

#2 requinix

requinix

    Anemic Moderator

  • Moderators
  • 6,803 posts
  • LocationWA

Posted 02 February 2013 - 11:31 PM

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users