title: python - regex why does `findall` find nothing, but `search` works?
body: <pre><code>&gt;&gt;&gt; reg = re.compile(r'^\d{1,3}(,\d{3})*$')
  &gt;&gt;&gt; str = '42'
  &gt;&gt;&gt; reg.search(str).group()
  '42'
  &gt;&gt;&gt; reg.findall(str)
  ['']
  &gt;&gt;&gt; 
  </code></pre>
  
  <p>python regex
  Why does <code>reg.findall</code> find nothing, but <code>reg.search</code> works in this piece of code above?</p>