title: Using RegEx to split and then truncate lines in a list
body: <p>I've been struggling with this for hours now, and granted I have issues with RegEx anyways, but no matter what I can't seem to find my error.  My purpose is to be able to have portions of lines that are on the clipboard stripped out, pasting only the remaining portion into various textboxes.  The format on the clipboard is:</p>
  <blockquote>
  <p>Heading: Information</p>
  <p>Heading: Information</p>
  <p>Information</p>
  <p>Heading: Information</p>
  <p>etc,etc,etc</p>
  </blockquote>
  <p>I need only the information to remain, stripping the Header, colon, and whitespaces off.  The code I have thus far is:</p>
  <pre><code>string[] lines = null;
  object obj = this.Parent;
  StackPanel parent = (StackPanel)obj;
  ChildControls ccChildren = new ChildControls();
  
  if (Clipboard.GetText().Contains('='))
  {
  }
  else if (Clipboard.GetText().Contains(':'))
  {
      string filterLabels = @&quot;(?!\:)([^\:]*)$&quot;;
      lines = Regex.Split(Clipboard.GetText(), &quot;\r\n&quot;);
      List&lt;string&gt; linesList = new List&lt;string&gt;(lines);
  
      foreach (string line in linesList)
      {
           Regex.Replace(line, filterLabels, &quot;&quot;);                    
      }
  }
  else
  {
      lines = Regex.Split(Clipboard.GetText(), &quot;\r\n&quot;);
  }
  </code></pre>
  <p>The RegEx in <code>filterLabels</code> I got from playing with RegExBuddy, and according to that it should work fine.  But in reality it doesn't strip anything at all.  Anyone catch something I'm missing?</p>