title: how to get length of substring in Regular Expression JavaScript
body: <p>here is my regular expression</p>
  
  <pre><code>/^[a-zA-Z0-9-]{40}([a-zA-Z0-9-]{3}2[a-zA-Z0-9-]{12}){2,10}$/
  </code></pre>
  
  <p>There will be one condition: the length of every string after first 40 characters must be 16 characters. This 16 characters string will be non repeating and minimum of 2 times and maximum of 10 times. So i want to get the length of this sub-string which should be 16.</p>
  
  <p>Here is input string:</p>
  
  <pre><code>string input="PR212D4EB2-6B25-4020-BD2A-941F69C0AA4102GEX2421262506027GEX2437345435522"
  </code></pre>
  
  <p>I want to match the length of "GEX2421262506027" and "GEX2437345435522". Like this, there will be 10 strings max. I want to validate if this length should be 16 characters.</p>