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 - 10:12 AM

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

    Transforming Moderator

  • Moderators
  • 6,239 posts
  • LocationWA

Posted 02 February 2013 - 06: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

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com