title: php preg_split, "nothing to repeat" error
body: <p>I need to split string with multiple possible delimiters</p>
  
  <pre><code>$output = preg_split( "/(\^|+)/", "54654561^uo_sgzg@zrgher.com" );
  </code></pre>
  
  <p>-> ("54654561", "uo_sgzg@zrgher.com")</p>
  
  <pre><code>$output = preg_split( "/(\^|+)/", "54654561+ghkkgzg@zrgher.com" );
  </code></pre>
  
  <p>-> ("54654561", "ghkkgzg@zrgher.com")</p>
  
  <p>But this regex <code>"/(\^|+)/"</code> fails: <code>PHP Warning:  preg_split(): Compilation failed: nothing to repeat at offset 3</code> for some reason, however it's based on this answer <a href="https://stackoverflow.com/questions/4955433/php-multiple-delimiters-in-explode">Php multiple delimiters in explode</a></p>
  
  <p>this one is working <code>$output = preg_split("/[\^|+]/", "54654561^MYMED_sgzg@zrgher.com" );</code> is it the right way to split with multiple delimiters?</p>
  
  <p><strong>edit</strong> : sorry I just realized it's working like this <code>$output = preg_split("/(\^|\+)/", "54654561^MYMED_sgzg@zrgher.com" );</code></p>