title: Python regex for int with at least 4 digits
body: <p>I am just learning regex and I'm a bit confused here. I've got a string from which I want to extract an int with at least 4 digits and at most 7 digits. I tried it as follows:</p>
  
  <pre><code>&gt;&gt;&gt; import re
  &gt;&gt;&gt; teststring = 'abcd123efg123456'
  &gt;&gt;&gt; re.match(r"[0-9]{4,7}$", teststring)
  </code></pre>
  
  <p>Where I was expecting 123456, unfortunately this results in nothing at all. Could anybody help me out a little bit here?</p>