title: Regex satisfying several conditions
body: <p>Using python, I am trying to identify strings that verify the following conditions:</p>
  <ol>
  <li>It must contain 9 characters</li>
  <li>Characters 2 to 8 must be numbers</li>
  <li>Characters 1 and 9 can be numbers or letters (lower or upper)</li>
  <li>Characters 1 and 9 can't be both numbers.</li>
  </ol>
  <p>For example, 'A12345678', '01234567A' and 'A1234567B' will match, but '012345678' will not match.</p>
  <p>For conditions 1 to 3 I use <code>'([a-z]|[A-Z]|[0-9])[0-9]{7}([a-z]|[A-Z]|[0-9])$'</code>. For condition 4 I use <code>'(?![0-9]{9}$)'</code>. However, I don't know how to join those conditions in a unique regex. Can somebody help me? Thanks in advance!</p>