title: Removing all whitespace lines from a multi-line string efficiently
body: <p>In C# what's the best way to remove blank lines i.e., lines that contain only whitespace from a string? I'm happy to use a Regex if that's the best solution.</p>
  
  <p>EDIT: I should add I'm using .NET 2.0.</p>
  
  <hr>
  
  <p><em>Bounty update</em>:  I'll roll this back after the bounty is awarded, but I wanted to clarify a few things.</p>
  
  <p>First, any Perl 5 compat regex will work.  This is not limited to .NET developers.  The title and tags have been edited to reflect this.</p>
  
  <p>Second, while I gave a quick example in the bounty details, it isn't the <em>only</em> test you must satisfy.  Your solution <strong>must</strong> remove <strong>all</strong> lines which consist of nothing but whitespace, <strong>as well as the last newline</strong>.  If there is a string which, after running through your regex, ends with "/r/n" or <em>any whitespace characters</em>, it fails.  </p>