title: strings with wildcards matching
body: <p>I need to match two strings with simple wildcards:</p>
  
  <p><code>"oh.my.*"</code> matches <code>"*.my.life"</code>, <code>"oh.my.goodness"</code> and <code>"*.*.*"</code>, but not <code>"in.my.house"</code></p>
  
  <p>The only wildcard is *, which substitutes string of any character (minus .)</p>
  
  <p>I thought of using fnmatch, but it does not accept wildcards in file name.</p>
  
  <p>There is some code with regex which i am using now - something simpler would be better, i guess:</p>
  
  <pre><code>def notify(self, event, message):
      events = []
      r = re.compile(event.replace('.','\.').replace('*','[^\.]+'))
      for e in self._events:
          if r.match(e):
              events.append(e)
          else:
              if e.find('*')&gt;-1:
                  r2 = re.compile(e.replace('.','\.').replace('*','[^\.]+'))
                  if r2.match(event):
                      events.append(e)
      for event in events:
          for callback in self._events[event]:
              callback(self, message)
  </code></pre>