title: uuidv4.js regular expression issue - IE11
body: <p>I am currently working in a company where I have to fix a couple issue with IE11. One of the issues is only present in IE11 which centers around uuidv4 from node_modules. </p>
  
  <p>the code at fault and the error that I am seeing is</p>
  
  <blockquote>
    <p>Syntax error in regular expression</p>
  </blockquote>
  
  <pre><code>    /***/ (function (module, exports, __webpack_require__) {
  
          "use strict";
          //eval("
  
          var __importDefault = (this &amp;&amp; this.__importDefault) || function (mod) {
  
              return (mod &amp;&amp; mod.__esModule) ? mod : {"default": mod };};
  
              Object.defineProperty(exports, "__esModule", { value: true });
              const v4_1 = __importDefault(__webpack_require__(/*! uuid/v4 */ "../node_modules/uuid/v4.js"));
              const v5_1 = __importDefault(__webpack_require__(/*! uuid/v5 */ "../node_modules/uuid/v5.js"));
              const uuidv4 = function () {
                  return v4_1.default();
              };
  
              uuidv4.regex = {
                  v4: /^(?:[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12})|(?:0{8}-0{4}-0{4}-0{4}-0{12})$/u,
                  v5: /^(?:[a-f0-9]{8}-[a-f0-9]{4}-5[a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12})|(?:0{8}-0{4}-0{4}-0{4}-0{12})$/u
              }; uuidv4.is = function (value) {
  
                  return uuidv4.regex.v4.test(value) || uuidv4.regex.v5.test(value); 
              }; uuidv4.empty = function () {
                  return '00000000-0000-0000-0000-000000000000';
              };
  
              uuidv4.fromString = function (text) {
                  const namespace = 'bb5d0ffa-9a4c-4d7c-8fc2-0a7d2220ba45';
                  const uuidFromString = v5_1.default(text, namespace);
                  return uuidFromString;
              };
  
              exports.default = uuidv4;
  
              //# sourceURL=webpack://_chex/../node_modules/uuidv4/build/lib/uuidv4.js?");
  
              /***/
          }),
  </code></pre>
  
  <p>I did see and look to resolve what could have been one of the problems in the code in here changing </p>
  
  <p><code>v5: /^(?:[a-f0-9]{8}-[a-f0-9]{4}-5[a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12})|(?:0{8}-0{4}-0{4}-0{4}-0{12})$/u</code> </p>
  
  <p>to </p>
  
  <p><code>v5: /^(?:[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12})|(?:0{8}-0{4}-0{4}-0{4}-0{12})$/u</code></p>
  
  <p><code>{4}-5</code> was the offending item in this regex, however IE11 still complains about the same issue. </p>
  
  <p>But on closer inspection this is the line that it is complaining about </p>
  
  <p><code>v4: /^(?:[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12})|(?:0{8}-0{4}-0{4}-0{4}-0{12})$/u,</code></p>
  
  <p>When trying to put debugger statements in place, I cant hit these as before I get there and the code is being evaluated it fails and produces the error. </p>
  
  <p>Any and all help on this will be gratefully received. </p>