title: Split string with string as delimiter
body: <p>I'm trying to split a string in a batch file using a string (rather than a character) as the delimiter.</p>
  
  <p>The string has the format:</p>
  
  <pre><code>string1 by string2.txt
  </code></pre>
  
  <p>The delimiter is <code>by</code> (yes, space, the word 'by', followed by space). The output I want is:</p>
  
  <pre><code>string1
  
  string2
  </code></pre>
  
  <p>So, basically, split the string into 2 parts by the delimiter <code>by</code> and remove the suffix from the second string. How can I do this?</p>