ansible.builtin.match (v2.16.5) — test

Does string match regular expression from the start

Authors: Ansible Core

Install Ansible via pip

Install with pip install ansible-core==2.16.5

Description

Compare string against regular expression using Python's match function, this means the regex is automatically anchored at the start of the string.

Inputs

    
_input:
    description: String to match.
    required: true
    type: string

pattern:
    description: Regex to match against.
    required: true
    type: string

multiline:
    default: false
    description: Match against multiple lines in string.
    type: boolean

ignorecase:
    default: false
    description: Use case insenstive matching.
    type: boolean

Outputs

_value:
  description: Returns V(True) if there is a match, V(False) otherwise.
  type: boolean