title: Python regex insert
body: <p>I have a String s</p>
  
  <pre><code>s = "x01777"
  </code></pre>
  
  <p>Now I want to insert a <code>-</code> into s at this position:</p>
  
  <pre><code>s = "x01-777"
  </code></pre>
  
  <p>I tried to do this with <code>re.sub()</code> but I can't figure out how to insert the <code>-</code> without deleting my regex (I need this complex structure of regex because the String I want to work with is much longer).</p>
  
  <p>Actually, it looks something like this:</p>
  
  <pre><code>re.sub('\w\d\d\d\d\d', 'here comes my replacement', s)
  </code></pre>
  
  <p>How do I have to set up my insertion?</p>