title: How to split string by string in Powershell
body: <p>I'm trying to spit the string with a delimiter, which is a string:</p>
  
  <pre><code>$string = "5637144576, messag&lt;&gt;est&lt;&lt;&gt;&gt;5637145326, 1&lt;&lt;&gt;&gt;5637145328, 0"
  $separator = "&lt;&lt;&gt;&gt;"
  $string.Split($separator)
  </code></pre>
  
  <p>As the result of splitting I get:</p>
  
  <pre><code>5637144576, messag
  
  est
  
  
  
  5637145326, 1
  
  
  
  5637145328, 0
  </code></pre>
  
  <p>Instead of</p>
  
  <pre><code>5637144576, messag&lt;&gt;est
  5637145326, 1
  5637145328, 0
  </code></pre>
  
  <p>When I try to use overloaded split which accepts string[]:</p>
  
  <pre><code>$string = "5637144576, messag&lt;&gt;est&lt;&lt;&gt;&gt;5637145326, 1&lt;&lt;&gt;&gt;5637145328, 0"
  $separator = @("&lt;&lt;&gt;&gt;")
  $string.Split($separator)
  </code></pre>
  
  <p>But I get next error:</p>
  
  <pre><code>Cannot convert argument "0", with value: "System.Object[]", for "Split" to type "System.Char[]": "Cannot convert value "&lt;&lt;&gt;&gt;" to type "System.Char". Error: "String must be exactly one character long.""
  </code></pre>
  
  <p>Does someone knows how to split string by string?</p>