title: python:regex \1 is not working as expected
body: <p>in the program \1 should replace the first number in the text but it is not replacing can anyone help </p>
  
  <pre><code>def remove():
      r=re.compile(r'(\d{6})')
      text=pyperclip.paste()
      m=r.sub(r'\1*****',text)
      print(m)
  </code></pre>
  
  <p>if we have a six digit number like 252526 then it should be replaced by 2*****</p>