title: Regex for spliting on all unescaped semi-colons
body: <p>I'm using php's <a href="http://php.net/manual/en/function.preg-split.php" rel="nofollow noreferrer">preg_split</a> to split up a string based on semi-colons, but I need it to only split on non-escaped semi-colons.</p>
  
  <pre><code>&lt;?
  $str = "abc;def\\;abc;def";
  $arr = preg_split("/;/", $str);
  print_r($arr);
  ?&gt;
  </code></pre>
  
  <p>Produces:</p>
  
  <pre><code>Array
  (
      [0] =&gt; abc
      [1] =&gt; def\
      [2] =&gt; abc
      [3] =&gt; def
  )
  </code></pre>
  
  <p>When I want it to produce:</p>
  
  <pre><code>Array
  (
      [0] =&gt; abc
      [1] =&gt; def\;abc
      [2] =&gt; def
  )
  </code></pre>
  
  <p>I've tried <code>"/(^\\)?;/"</code> or <code>"/[^\\]?;/"</code> but they both produce errors. Any ideas?</p>