title: Sed append regex capture groups
body: <p>If someone can please assist, I'm trying to do a sed append using regex and capture groups but its not working fully:</p>
  
  <pre><code>echo "#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/" | sed -re '/#baseurl=http:\/\/mirror.centos.org(.*)/a baseurl=https:\/\/10.10.10.10\ \1'
   #baseurl=http://mirror.centos.org/centos//contrib//
   baseurl=https://10.10.10.10 1
  </code></pre>
  
  <p>At the moment it is just giving the literal value 1 rather than the capture group.</p>
  
  <p>It should give:</p>
  
  <pre><code> #baseurl=http://mirror.centos.org/centos//contrib//
   baseurl=https://10.10.10.10/centos//contrib//
  </code></pre>
  
  <p>I have tried backslash parentheses as well but its not working. Please assist....as it is hurting my head now...</p>