title: Extract last character of string with ansible and regex_replace filter
body: <p>In a playbook, I try to extract the last character of variable "ansible_hostname". </p>
  
  <p>I try to use regex_replace filter to do that, but nothing works. </p>
  
  <p>I simplified my piece of script with this ad-hoc command : </p>
  
  <blockquote>
    <p>ansible  localhost -m debug -a "msg= {{ 'devserver01' |
    regex_replace('[0-9]{1}$', '\1') }}"</p>
  </blockquote>
  
  <p>I want to extract the last character : '1'. </p>
  
  <p>I'm using Ansible 2.0. </p>