String: replace a line which contains a word
<p>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:</p>

<pre><code>Lorem ipsum dolor sit amet, 
consectetur adipiscing elit. 
Suspendisse egestas.
</code></pre>

<p>So I would like to find a method to replace the whole line that contains for example phrase <code>elit</code> with the new line <code>enim vehicula pellentesque.</code> so the resoult would be: </p>

<pre><code>Lorem ipsum dolor sit amet, 
enim vehicula pellentesque. 
Suspendisse egestas.
</code></pre>

<p>Is there a quick way to do it?</p>

<p>Thanks</p>
