title: How to use regex as dictionary's key?
body: <p>I've to treat a file using a python script. The file is an automatic creation so some character can be added before and after the key. So I wanna use regex to match them (the middle part is always the same and their is any trouble to do it):</p>
  
  <pre><code>def dict(x):
   return{
    '.*key1.*': 'blabla',
    '.*key2.*': 'thing'
   }.get(x,'default')
  </code></pre>
  
  <p>This is not working because <code>".*"</code> represent character.</p>
  
  <p>How can I do to perform this?</p>