title: How to create Javascript regex pattern with exact match of digit and alphabets?
body: <p>Here is my scenario i want to create JavaScript regex pattern with must of 8 characters with below constrain </p>
  
  <ul>
  <li>one letter [A-Z] (Capital letters only)</li>
  <li><p>seven digits [0-9]</p>
  
  <pre><code>var data = ['A1234567', '1234567', 'C1234567'];
  data.map(function(q, index) {
  if (q.match(/[A-Z]{1}^\d{7}$/gi)) {
     console.log('Data ' + index + 'matched', q)
   } else {
    console.log('Not matched')
   }
  });
  </code></pre></li>
  </ul>
  
  <p>Regex pattern is <strong>/[A-Z]{1}^\d{7}$/gi</strong></p>
  
  <p>All three are not matched.Here what i'm doing wrong?</p>