title: RegExp in TypeScript
body: <p>How can I implement RegExp in TypeScript?</p>
  <p>My example:</p>
  <pre><code>var trigger = &quot;2&quot;
  var regex = new RegExp('^[1-9]\d{0,2}$', trigger); // where I have exception in Chrome console
  </code></pre>