title: Why does re.findall() give me different results than re.finditer() in Python?
body: <p>I wrote up this regular expression:</p>
  
  <pre><code>p = re.compile(r'''
  \[\[            #the first [[
  [^:]*?          #no :s are allowed
  .*?             #a bunch of chars
  (
  \|              #either go until a |
  |\]\]           #or the last ]]
  )
                  ''', re.VERBOSE)
  </code></pre>
  
  <p>I want to use <code>re.findall</code> to get all the matching sections of some string.  I wrote some test code, but it gives me bizarre results.  </p>
  
  <p>This code </p>
  
  <pre><code>g = p.finditer('   [[Imae|Lol]]     [[sdfef]]')
  print g
  for elem in g:
      print elem.span()
      print elem.group()
  </code></pre>
  
  <p>gives me this output:</p>
  
  <pre><code>(3, 10)
  [[Imae|
  (20, 29)
  [[sdfef]] 
  </code></pre>
  
  <p>Makes perfect sense right?  But when I do this:</p>
  
  <pre><code>h = p.findall('   [[Imae|Lol]]     [[sdfef]]')
  for elem in h:
      print elem
  </code></pre>
  
  <p>the output is this:</p>
  
  <pre><code>|
  ]]  
  </code></pre>
  
  <p>Why isn't findall() printing out the same results as finditer??</p>