title: Ansible regex_replace insert value after regex match
body: <p>I have a version variable, which I need to split and insert a . in between</p>
  
  <p>I tried this </p>
  
  <pre><code>ansible localhost  -e version=300 -m debug -a "msg={{ version  | regex_replace('\d{1,2}', '.\g&lt;0&gt;' ) }}"
  </code></pre>
  
  <p>But the o/p is </p>
  
  <pre><code>TASK [debug] ********************************************************************************************************************************************************************************************************************************
  ok: [localhost] =&gt;
    msg: .30.0
  </code></pre>
  
  <p>There is a . getting <strong>.30.0</strong> added in the first place. I  can use regex_repace to remove the first. after that. 
  But is there any other better way? Why is pattern putting the decimal point in the first place? </p>