Regular Expression with letter
<p>I need to match things that format something along the lines of 
657432-76,   54678-01,   54364<strong>A</strong>-12</p>

<p>I got <code>(r'^\d{6}-\d{2}$')</code>
and   <code>(r'^\d{5}-\d{2}$')</code>
but how do you get the letter?</p>

<p>thanks!!</p>

<p>it seems the pattern generically is 6 characters with possible letter or number at last char max then <code>-</code> then 2 numbers? so then you'd use this pattern</p>

<p><code>pattern = r'^d{5}.+-\d{2}$'</code></p>

python regex format expression