title: How do I create a regular expression to split lines, except if there is a slash?
body: <p>I am using "my-string".split("\n") to split a string into an array of lines, and that is working nicely.</p>
  
  <p>However now I need to add support for a continuation character "\".</p>
  
  <p>I would like to change my split so that it splits the string into lines on '\n' <em>except</em> if there is a "\" character just before the "\n"</p>
  
  <p>So for example "THIS\nIS\nA\nTEST" would split into "THIS", "IS", "A\nTEST"</p>
  
  <p>At first I thought I would go and replace all of the instances of instances of  /\n with a placeholder, then change them back at the end. But that is too much processing. The string can be pretty long, and can consume many lines.</p>