title: regex_replace in ansible isn't replacing string with capture group 1
body: <p>so my main.yml file is using vars + a regex_replace filter and what I'm seeing is that I either get no response or the matched string is taken out and i'm left with the rest...</p>
  
  <pre><code>hosts: jenkinsservers
  vars:
    teamname: "{{ inventory_hostname | regex_replace('(?&lt;=\\-)(.*?)(?=\\.)', '\\1') }}"
  </code></pre>
  
  <p>example hosts:</p>
  
  <pre><code>jenkins-team1.example.com
  </code></pre>
  
  <p>result: teamname continues to be <code>jenkins-team1.example.com</code></p>
  
  <p>however, if I remove , '\1' , leaving just</p>
  
  <pre><code>"{{ inventory_hostname | regex_replace('(?&lt;=\\-)(.*?)(?=\\.)') }}"
  </code></pre>
  
  <p>then teamname var results in <code>jenkins-.example.com</code></p>
  
  <p>so I believe the regex is matching the "team1" as intended, why is it that \1 doesn't make the whole var just the captured string?</p>