On Wed, 3 Jun 2020 22:46:37 -0700 (PDT)
Pawan Kumar <[email protected]> wrote:

> '^[a-zA-Z0-9-+.#$%&~*\/=?^_ '\"\\!]{9,430}$'

Try this

  '^[a-zA-Z0-9-+.#$%&~*/=?^_''\"!]{9,430}$'

In "single-quoted style" only the single-quote must be escaped ('')
https://yaml.org/spec/1.2/spec.html#id2788097

For example (occurrences left out)

    - debug:
        msg: OK
      loop: ['a', '+', '}']
      when: item is match(context_regex)
      vars:
        context_regex: '^[a-zA-Z0-9-+.#$%&~*/=?^_''\"!]$'

gives

    ok: [localhost] => (item=a) => {
        "msg": "OK"
    }
    ok: [localhost] => (item=+) => {
        "msg": "OK"
    }
    skipping: [localhost] => (item=})

HTH,

        -vlado

-- 
Vladimir Botka

-- 
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/20200604092648.5ef145dd%40gmail.com.

Attachment: pgpyH76Pi3_hA.pgp
Description: OpenPGP digital signature

Reply via email to