title: Finding a string in match objects in python
body: <p>I'd like to find a string in "match objects" in python, but ".find" does not work. Here is my snippet:</p>
  
  <pre><code>e_list = []
  for file in os.listdir('.'):
      r = re.compile(r".*\.(aaa|bbb)$")
      e_found = r.search(file)
      if e_found is not None:
          e_list.append(e_found.group(0))
  
  e_length = len(e_list);
  
  for num_e in range(e_length):
      if(e_list[num_e].group(0).find('50M') &gt; 0)
          print(e_list[num_e].group(0))
  </code></pre>
  
  <p>... Now <code>e_list</code> is like:</p>
  
  <pre><code>[&lt;_sre.SRE_Match object; span=(0, 7), match='30M.aaa'&gt;,  
   &lt;_sre.SRE_Match object; span=(0, 7), match='40M.bbb'&gt;,  
   &lt;_sre.SRE_Match object; span=(0, 7), match='50M.aaa'&gt;,  
   &lt;_sre.SRE_Match object; span=(0, 7), match='50M.bbb'&gt;,  
   &lt;_sre.SRE_Match object; span=(0, 7), match='50M.ccc'&gt;]
  </code></pre>
  
  <p>I'm expecting to have the result:</p>
  
  <pre><code>'50M.aaa'  
  '50M.bbb'
  </code></pre>
  
  <p>While <code>e_list[0].group(0)</code> returns <code>'30M.aaa'</code>, <code>.find</code> cannot be applied because it's a match object. Then, what should I do?</p>