title: React-Native: JavaScript regular expression exception (Invalid group) on release mode
body: <p>I wrote following function in order to parse available image sizes inside <code>srcset</code> attribute for each <code>img</code> element and return it as array.
  Everything works as expected when the debug mode is on, but once I disable the debug mode, the app would crash and throw following error:</p>
  
  <p><a href="https://i.stack.imgur.com/QpxT7.png" rel="nofollow noreferrer">Error: invalid regular expression invalid group specifier name</a></p>
  
  <pre><code>export function srcsetParser(htmlString) {
  
    let result = [];
    let images = htmlString.match(/&lt;img\s+[^&gt;]*srcset="([^"]*)"[^&gt;]*&gt;/g); // Finding img tags inside html string
  
    images &amp;&amp; images.forEach(image =&gt; {
      let srcsets = image.match(/(?&lt;=srcset=").+?(?=\")/g); //Select srcset value
  
      var urls = srcsets[0].split(", ");
      urls.forEach(url =&gt; {
        let temp = url.split(" ");
        result.push(temp[0]);
      });
    });
    return result;
  }
  </code></pre>
  
  <p>Any idea what's wrong with the regex and why is it so only when debug mode is off ?</p>
  
  <p>Thanks</p>