FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » How do I do this search and replace?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
How do I do this search and replace? [message #172300] Sat, 12 February 2011 21:15 Go to previous message
laredotornado@zipmail is currently offline  laredotornado@zipmail
Messages: 5
Registered: January 2011
Karma:
Junior Member
Hi,

I'm using PHP 5. I want to search for all instances of the "\n"
character in my $contents variable and replace it with "\r\n".
However, I do not want to replace the "\n" if the character
immediately before is already a "\r". How would I construct such a
search and replace to do this?

Thanks, - Dave
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Curious problem
Next Topic: Hot Sameera Hot Cleavage show - Download
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 02:38:55 GMT 2024

Total time taken to generate the page: 0.04192 seconds