I have a string copied from a mutiline text box. I am looking for a method to replace the whole line which contains a specific phrase. For example the string looks like this:
Lorem ipsum dolor sit amet,
consectetur adipiscing elit.
Suspendisse egestas.
So I would like to find a method to replace the whole line that contains for example phrase elit
with the new line enim vehicula pellentesque.
so the resoult would be:
Lorem ipsum dolor sit amet,
enim vehicula pellentesque.
Suspendisse egestas.
Is there a quick way to do it?
Thanks