title: python regular expression numbers in a row
body: <p>I'm trying to check a string for a maximum of 3 numbers in a row for which I used:</p>
  
  <pre><code>regex = re.compile("\d{0,3}")
  </code></pre>
  
  <p>but this does not work for instance the string <code>1234</code> would be accepted by this regex even though the digit string if over length 3. </p>