I have this snipplet:
---
- hosts: all
gather_facts: False
become: yes
become_user: somesu
become_method: sudo
tasks:
- set_fact:
tmped: "{{varput | regex_search('(^(?:[^.]*.){4}([^.]*))')}}"
- debug: msg="{{ tmped }}"
...
varput is
TEST123TEST.4.TES22TES.ZTER012UZT.20190910.555
and I want the debug to print out
20190910
However my regex print out
TEST123TEST.4.TES22TES.ZTER012UZT.20190910
any idea how to fix this?
Thanks