title: Why is re.findall matching the string, but not returning the results correctly?
body: <p>I want to find a substring of the pattern <code>([A-Z][0-9]+)+</code> in another string.</p>
  
  <p>One way to do this would be:</p>
  
  <pre><code>import re
  re.findall("([A-Z][0-9]+)+", "asdf A0B52X4 asdf")[0]
  </code></pre>
  
  <p>Curiously, this yields <code>'X4'</code>, not <code>'A0B52X4'</code>, which was the result I expected.</p>
  
  <p>Digging a bit into this, I also tried to just match the simple groups the string is composed of:</p>
  
  <pre><code>re.findall("[A-Z][0-9]+", "asdf A0B52X4 asdf")
  </code></pre>
  
  <p>Which yields the expected result: <code>['A0', 'B52', 'X4']</code></p>
  
  <p>And even more interesting:</p>
  
  <pre><code>re.findall("([A-Z][0-9]+){3,}", "asdf A0B52X4 asdf")
  </code></pre>
  
  <p>Which yields <code>['X4']</code>, but still seems to match the whole string I'm interested in, which is confirmed by trying <code>re.search</code> and using the result to obtain the substring manually:</p>
  
  <pre><code>m = re.search("([A-Z][0-9]+)+", "asdf A0B52X4 asdf")
  m.string[m.start():m.end()]
  </code></pre>
  
  <p>This yields <code>'A0B52X4'</code>.</p>
  
  <p>Now from what I know about regular expressions in python, parentheses not only just match the RE inside them, but also declare a "group" which lets you do all sorts of things with it. My theory would be that for some reason, <code>re.findall</code> only puts the last match of a group into the result string as opposed to the complete match.</p>
  
  <p>Why does <code>re.findall</code> behave like this?</p>