title: new RegExp is not working
body: <p>I have a regular expression which validates 3 consecutive digits.</p>
  
  <pre><code>/^\d{3}$/.test("12345")  // false
  /^\d{3}$/.test("123")    // true
  </code></pre>
  
  <p>How can I transform this regex pattern into a <code>RegExp</code> object?</p>
  
  <p>I tried:</p>
  
  <pre><code>var re = new RegExp("\\d{3}", "gi");
  </code></pre>
  
  <p>but <code>re.test("12345")</code> returns true</p>
  
  <p>What am I doing wrong?</p>