title: Why is this regexp returning an empty item at the beginning of the array?
body: <p>I've got a javascript string I'm trying to split, but I'm getting an empty element at the beginning of the returned array, and I can't figure out why. </p>
  
  <pre>
  var split_in_el = in_el.split(/(#|\.|\[)/);
  </pre>
  
  <p>where split_in_el is either <code>first</code>,<code>#last</code>, or <code>[color:red]</code>.</p>
  
  <p>the returned arrays I'm getting (in Node.js, but shouldn't matter) are</p>
  
  <pre>
  .first //split_in_el
  [ '', '.', 'first' ]  //returned
  #last //split_in_el
  [ '', '#', 'last' ] //returned
  [color:blue] //split_in_el
  [ '', '[', 'color:blue]' ] //returned
  </pre>
  
  <p>Here's a jsfiddle showing the issue. </p>