title: Regex to check fix length field with packed space
body: <p>Say I have a text file to parse, which contains some fixed length content:</p>
  
  <pre><code>123jackysee        45678887
  456charliewong     32145644
  &lt;3&gt;&lt;------16------&gt;&lt;--8---&gt; # Not part of the data.
  </code></pre>
  
  <p>The first three characters is ID, then 16 characters user name, then 8 digit phone number.</p>
  
  <p>I would like to write a regular expression to match and verify the input for each line, the one I come up with:</p>
  
  <pre><code>(\d{3})([A-Za-z ]{16})(\d{8})
  </code></pre>
  
  <p>The user name should contains 8-16 characters. But <code>([A-Za-z ]{16})</code> would also match null value or space. I think of <code>([A-Za-z]{8,16} {0,8})</code> but it would detect more than 16 characters. Any suggestions?</p>