title: Regular Expression Letter followed by numbers or numbers and a letter
body: <p>I am having some difficulty with the following for a regular expression:</p>
  
  <p>G followed by 1-5 numbers</p>
  
  <p>or G followed by 4 numbers followed by a single letter A-Z</p>
  
  <p>Could someone please assist?</p>
  
  <p>e.g. of valid entries would be:</p>
  
  <pre><code>G2
  G12
  G123
  G1234
  G12345
  G1234A
  </code></pre>
  
  <p>Thanks</p>