title: RexExp Passing variable
body: <p>I have a problem with passing variables into a <code>regExp</code>.</p>
  
  <p>Here my code:</p>
  
  <pre><code>project.highlight = function($st,$search) {
      re = new RegExp("/\b("+ $search +")\b/g");
      return $st.replace(/\b(lorem)\b/g, '&lt;span class="highlight"&gt;$1&lt;/span&gt;');  // working
      return $st.replace(re, '&lt;span class="highlight"&gt;$1&lt;/span&gt;');  // not working...
  }
  </code></pre>
  
  <p>What am I doing wrong?</p>