title: Cannot Add the number of repeats to RegExp JS
body: <p>I've wrote the code for calculation the repeatable symbol maximal substring length using RegExp. For finish I need to include to constructor the numbers of repeats:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const word = "fkffhjhlkjhkjhkjhqqqhqkqkqkhk";
  const toCharWord = Array.from(word);
  const uniqueChars = new Set(toCharWord);
  console.log(uniqueChars);
  
  
  
  let lenghtsArrays = [];
  for (let element of uniqueChars) {
    const regExp = new RegExp(`${element}{2,}`, "g"); // Something wrong here!!!
    lenghtsArrays.push(word.match(regExp).length);
  
  
  }
  console.log(lenghtsArrays);
  
  function getMaxOfArray(numArray) {
    return Math.max.apply(null, numArray);
  }
  console.log(getMaxOfArray(lenghtsArrays));</code></pre>
  </div>
  </div>
  </p>
  <p>How I should to write this line correct? Thanks in advance!</p>