title: Python regex \number adding \0x
body: <p>I am tring to go a simple regex replace on a string in python. This is my code:</p>
  
  <pre><code>&gt;&gt;&gt; s = "num1 1 num2 5"
  &gt;&gt;&gt; re.sub("num1 (.*?) num2 (.*?)","1 \1 2 \2",s)
  </code></pre>
  
  <p>I would expect an output like this, with the <code>\number</code>s being replaced with their corresponding groups.</p>
  
  <pre><code>'1 1 2 5'
  </code></pre>
  
  <p>However, this is the output I am getting:</p>
  
  <pre><code>'1 \x01 2 \x025'
  </code></pre>
  
  <p>And I'm kinda stumped as to why the <code>\x0</code>s are their, and not what I would like to be there. Many thanks for any help</p>