title: Match literals with 'regex_replace' Ansible filter
body: <p>I cannot find a way to much a literal (a dot) in Ansible's regex_replace filter. Here is the task:</p>
  
  <pre><code>- name: Display database name
    debug:
      msg: "{{ vhost | regex_replace('(.+\.)(.+)$', \\1) }}"
    tags: [debug]
  </code></pre>
  
  <p>My intention is to match and replace the whole URL like <strong>test.staging.domain.com</strong> with its first part (<strong>test</strong> in the example). </p>
  
  <p>Ansible would report the following error:</p>
  
  <pre><code>debug:
    msg: "{{ vhost | regex_replace('(.+\.)(.+)$', \\1) }}"
                                       ^ here
  </code></pre>
  
  <blockquote>
    <p>We could be wrong, but this one looks like it might be an issue with
    missing quotes.  Always quote template expression brackets when they
    start a value.</p>
  </blockquote>
  
  <p>How can I match literals in Ansible <code>regexp_replace</code> filter?</p>