On 2022-06-20 (Mon) 11:36, [email protected] wrote:
Here is an example:

- hosts: localhost
   gather_facts: false
   vars:
     q:
       - 'abc<tab character here>'
       - 123
   tasks:
     - debug:
         msg: >-
           {{ q is search('abc\t') }}

This returns false. I have tried different variations of the regex, but nothing worked. Is this possible to do?

Escape the tab with another single quote, like this:


            {{ q is search('abc\\t') }}



Dick

--
You received this message because you are subscribed to the Google Groups "Ansible 
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/96f9932e-46c0-b8a4-ed7b-ca939c7297c1%40gmail.com.

Attachment: OpenPGP_0x266713D4E6EF488D.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to