title: Cannot read property 'match' of undefined
body: <p>I'm running the following:</p>
  
  <pre><code>var token = document.location.href.split('?s=')[1].match(/[a-z0-9]+/);
  var longString = "?s=" + token + "?_sft_category=";
  var tokenB = document.location.href.split(longString)[1].match(/[a-z0-9]+/);
  var attribuB = "." + tokenB;
  jQuery('a[data-filter-value="' + attribuB + '"]').parent().parent().parent().find(".dropdown-toggle").html(tokenB).append(' &lt;span class="caret"&gt;&lt;/span&gt;');
  </code></pre>
  
  <p>How come I get? </p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'match' of undefined
  </code></pre>
  
  <p>If I remove <code>.match(/[a-z0-9]+/)</code> i don't get any error, but I do need <code>match</code> ..</p>
  
  <p>The URL looks like:</p>
  
  <pre><code>http://www.example.com/xchanges/results/?s=sky&amp;_sft_category=ogilvy
  </code></pre>