title: How to read and filter lines in text file Using C#
body: <p>1) I have a text file below like this.</p>
  
  <blockquote>
  <pre><code>Dilantha
  code 65
  po Bo 1255
  colombo
  sri lanka
  
  joy
  code 78
  toronto
  Canada
  </code></pre>
  </blockquote>
  
  <p>2) But I want the below result. ( I don't want the <strong>code 65</strong> and <strong>code 78</strong> parts)</p>
  
  <blockquote>
  <pre><code>Dilantha  colombo     sri lanka
  
  joy       toronto     Canada
  </code></pre>
  </blockquote>
  
  <p>3) My requirment is, first I want to read the text file, then I want to filter the the result shown in <strong>2</strong> above.</p>
  
  <p>Here's my Code. I'm using <strong>C#</strong></p>
  
  <pre><code>    String line;
      String path = "c:/sample.txt";
  
      StreamReader sr = new StreamReader(path);
      while ((line = sr.ReadLine()) != null)
      {
          //display the readed lines in the text box
          disTextBox.AppendText(line+Environment.NewLine);
      }
  </code></pre>