title: How can I expand a finite pattern into all its possible matches?
body: <p>For example, given the pattern</p>
  
  <pre><code>[a-zA-Z]_[0-9]{2}
  </code></pre>
  
  <p>a function would take the pattern and return an array or list containing</p>
  
  <pre><code>a_00, a_01, a_02, ... , a_98, a_99, ... , z_98, z_99
  </code></pre>
  
  <p>Only numbers and letters (and finite groupings thereof) need be expanded. How would I go about doing this? An example in Python or Perl would be preferred. Thank you!</p>