title: How to sum characters and digits with regex?
body: <p>I have a situation with a pattern that always has <code>length = 6</code>, stating with characters and finishings with numbers. I may have 2 to 5 characters, completing length to 6.</p>
  <p>Examples:</p>
  <pre><code>ABCDE1
  ABCD12
  ABC123
  AB1234
  </code></pre>
  <p>Today we use a Regex like this <code>([A-Z]{4}\d{2}|[A-Z]{3}\d{3}|[A-Z]{5}\d{1})</code> but it can grow, and make this solution turn into a monster.</p>
  <p>There is a way where I can get how many characters I have to set how many digits I should have?</p>
  <p>OBS: We always have characters and then digits, never mixed up.</p>