title: Javascript Regex: How to put a variable inside a regular expression?
body: <p>So for example:</p>
  
  <pre><code>function(input){
      var testVar = input;
      string = ...
      string.replace(/ReGeX + testVar + ReGeX/, "replacement")
  }
  </code></pre>
  
  <p>But this is of course not working :)
  Is there any way to do this?</p>