I am trying to replace selected text with another text.
Consider following is the line of text.
Hello world.Good morning. Hello world. Good morning.
Here if I select second morning
text and I want replace morning text with night. So that output need to look like this:
Hello world.Good morning. Hello world. Good night.
I tried replace function, but it is replacing first morning text.
Can anyone suggest solution for this?
');` (taken from http://stackoverflow.com/questions/6064956/replace-all-occurrences-in-a-string ) – Pablo Jan 07 '13 at 12:53