title: How to split a string by multiple chars?
body: <p>I have a string like this: <code>string ip = "192.168.10.30 | SomeName"</code>. 
  I want to split it by the <code>|</code> (including the spaces. With this code it is not possible unfortunately:</p>
  
  <pre><code>string[] address = ip.Split(new char[] {'|'}, StringSplitOptions.RemoveEmptyEntries);
  </code></pre>
  
  <p>as this leads to <code>"192.168.10.30 "</code>. I know I can add <code>.Trim()</code> to <code>address[0]</code> but is that really the right approach?</p>
  
  <p>Simply adding the spaces(<code>' | '</code>) to the search pattern gives me an </p>
  
  <blockquote>
    <p>Unrecognized escape sequence</p>
  </blockquote>