title: AngularJS: create a regex for first two character of a string alphabet and rest should be numeric
body: <p>Never really used AngularJS and am having issues figuring out how to create a regex for an input to check/allow only first 2 characters to be letters &amp; the rest numbers.</p>
  
  <p>Hope this makes sense.</p>
  
  <p>Using pugJS </p>
  
  <pre><code>.e-field
      label.e-field__label(for='invoiceNr') Invoice Number
      input#invoiceNumberInput.e-input(
        ng-model='$ctrl.invoiceNumber'
        name="invoiceNumber"
        ng-required="true"
  </code></pre>
  
  <p>invoiceNr example: <code>HN123123123</code></p>
  
  <p>The ng-pattern was the answer. This is what I used:</p>
  
  <p><code>ng-pattern="/^[a-zA-Z]{2}[0-9]{6,}$/"</code></p>