jQuery issue with removing lines from block of strings
<p>I have got the following line of strings:</p>

<pre><code>aaaaaaaa1
bbbbbbbb2
cccccccc3
dddddddd4
</code></pre>

<p>And this is my field:</p>

<pre><code>&lt;textarea id="myLinesField"&gt;&lt;/textarea&gt;
</code></pre>

<p>using jQuery, Having said that I am able to choose and remove any line (in any order), I am trying to remove specific lines from my lines say second line to have the exact result like the following:</p>

<pre><code>aaaaaaaa1
cccccccc3
dddddddd4
</code></pre>

<p>This is my code:</p>

<pre><code>var value = $('#myLinesField').val();
var newVal = recipientValue.replace(stringLineToBeRemoved,'');
var finalResults = newVal.replace("\n", "");
$('#myLinesField').val(finalResults);
</code></pre>

<p>But I get something like this in some cases (not always):</p>

<pre><code>aaaaaaaa1cccccccc3

dddddddd4
</code></pre>

<p>Can anyone tell me what am I missing here?</p>

<p>Thanks,</p>
