title: Python regex search: repeated digit n times
body: <p>I don't understand why this won't return a match for the repeating digits:</p>
  
  <pre><code>import re
  digits = '122223456789'
  re.search(r'(\d)\4', digits)
  </code></pre>
  
  <p>Instead, I get "error: invalid group reference at position 4"</p>