title: Invalid regular expression: invalid group specifier name - a regex expression that breaks on any iOS device
body: <pre><code>let addCommas = (number) =&gt; {
          let [head, ...rest] = number.toString().split('.');
          rest.length === 0 ? rest = ['00'] : rest;
          return head.toString().replace(/\B(?&lt;!\.\d*)(?=(\d{3})+(?!\d))/g, &quot;,&quot;) + '.' + rest;
      }
  </code></pre>
  <p>the regex part breaks my code on any ios device. even on google chrome.</p>
  <p>for the life of me, I couldn't understand why.</p>
  <p>any thoughts and or ways I could go around this?</p>