title: Issue with Regular expression in IE
body: <p>I have a problem in all versions of Internet Explorer with regular expressions. I get the error ”invalid syntax for regular expression”. It works fine in all other browsers including Microsoft Edge. While debugging in IE I noticed that it strips out ”/” in the beginning from the regex. Why does it do that?</p>
  
  <pre><code>var pattern = /^\d{10}$/;
  
  function isPattern(input, pattern) {
      if (typeof pattern === "string") {
          pattern = "^" + pattern + "$";
      }
      var rePattern = new RegExp( pattern, "i" );
      return (typeof input === "string" &amp;&amp; rePattern.test( input ));
  }
  </code></pre>
  
  <p>I suspect that the error is because in Explorer it removes the first "/" from regex.</p>