title: C# - Split string by any number of tabs and spaces
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/6111298/best-way-to-specify-whitespace-in-a-string-split-operation">Best way to specify whitespace in a String.Split operation</a>  </p>
  </blockquote>
  
  
  
  <p>I am trying to read in the hosts file that contains:</p>
  
  <pre><code>127.0.0.1 localhost
  ect...
  </code></pre>
  
  <p>So as I read it in line by line I need to grab the IP and the host name but how would I grab them if they are formated by any number of tabs or spaces or both.</p>
  
  <pre><code>127.0.0.1&lt;tab&gt;&lt;space&gt;localhost
  127.0.0.1&lt;space&gt;localhost
  127.0.0.1&lt;space&gt;&lt;space&gt;&lt;space&gt;&lt;space&gt;localhost
  </code></pre>