title: Javascript regex - split string
body: <p>Struggling with a regex requirement. I need to split a string into an array wherever it finds a forward slash. But not if the forward slash is preceded by an escape.</p>
  
  <p>Eg, if I have this string:</p>
  
  <pre><code>hello/world
  </code></pre>
  
  <p>I would like it to be split into an array like so:</p>
  
  <pre><code>arrayName[0] = hello
  arrayName[1] = world
  </code></pre>
  
  <p>And if I have this string:</p>
  
  <pre><code>hello/wo\/rld
  </code></pre>
  
  <p>I would like it to be split into an array like so:</p>
  
  <pre><code>arrayName[0] = hello
  arrayName[1] = wo/rld
  </code></pre>
  
  <p>Any ideas?</p>