title: why does this regular expression always return null?
body: <p>I need to check for classname in a string.</p>
  
  <p>My string looks like this:</p>
  
  <pre><code>testing ui-li ui-li-static ui-btn-up-f ui-first-child ui-filter-hidequeue
  </code></pre>
  
  <p>And I'm looking for <code>ui-filter-hidequeue</code> anywhere (!) in the string.</p>
  
  <p>This is what I'm trying. It always returns <code>null</code>, althought the string I'm trying to match is there:</p>
  
  <pre><code>var classPassed = 'ui-filter-hidequeue',
      classes = 'testing ui-li ui-li-static ui-btn-up-f ui-first-child ui-filter-hidequeue',
      c = new RegExp('(?:\s|^)' + classPassed + '(?:\s|$)');
  
  console.log( classes.match(c) )   // returns null
  </code></pre>
  
  <p><strong>Question:</strong><br>
  Can someone tell me what I'm doing wrong in my regex?</p>
  
  <p>Thanks!</p>