title: Python re.search finds result but group doesnt work
body: <p>I want to find number matching my pattern inside every line in the .txt file.
  <strong>text fragment</strong></p>
  
  <pre><code>sometext - 0.007442749125388171
  sometext - 0.004296183916209439
  sometext - 0.0037923667088698393
  sometext - 0.003137404884873018
  </code></pre>
  
  <p><strong>code</strong></p>
  
  <pre class="lang-py prettyprint-override"><code>file = codecs.open(FILEPATH, encoding='utf-8')
  for cnt, line in enumerate(file):
      result_text = re.match(r'[a-zżźćńółęąś]*', line).group()
      result_value = re.search(r'[0-9].[0-9]*', line).group()
      print("Line {}: {}".format(cnt, line))
  </code></pre>
  
  <p>It's strange because re.search finds results:</p>
  
  <pre><code>&lt;_sre.SRE_Match object; span=(8, 28), match='0.001879612135574806'&gt;
  </code></pre>
  
  <p>but if I want to assign result to variable I get this:
  <strong>error</strong></p>
  
  <pre><code>File "read.py", line 18, in &lt;module&gt;
  result_value = re.search(r'[0-9].[0-9]*', line).group()
  AttributeError: 'NoneType' object has no attribute 'group'
  </code></pre>