title: javascript regular expressions with variables?
body: <p>I am trying to execute a regular expression with a variable as the query.</p>
  
  <pre><code>//This works
  $('body *').replaceText(/\b(Toronto)/gi, nameWrapper );
  </code></pre>
  
  <p>I need to have "Toronto" in a variable</p>
  
  <pre><code>var query = "Toronto";
  $('body *').replaceText(/\b( --  query VARIABLE HERE --  )/gi, nameWrapper );
  </code></pre>