Writing to a text file by trimming certain characters using C#?
<p>Here i am writing into a text file..I am searching for a key word <code>Raiserror</code> in a sql file and if that keyword exist i have to write that line..</p>

<p>It is writing like</p>

<pre><code>LineNo : 66 :  raiserror ('Sequence number cannot be blank',16,1)
</code></pre>

<p>But i need to write only </p>

<pre><code> LineNo : 66 : Sequence number cannot be blank
</code></pre>

<p>Is this possible..If so how to trim..
Here is my code</p>

<pre><code>while ((line = file.ReadLine()) != null)
{
    if (line.IndexOf("Raiseerror", StringComparison.CurrentCultureIgnoreCase) != -1)
    {
        dest.WriteLine("LineNo : " + counter.ToString() + " : " + "           " + line.TrimStart());
    }
    counter++;
}

file.BaseStream.Seek(0, SeekOrigin.Begin);
counter = 1;
</code></pre>

<p>Any Suggestion?</p>
