ansible.builtin.regex_escape (v2.16.0) — filter

escape regex chars

| "added in version" 2.8 of ansible.builtin"

Authors: unknown

Install Ansible via pip

Install with pip install ansible-core==2.16.0

Description

Escape special characters in a string for use in a regular expression.

Inputs

    
_input:
    description: String to escape.
    required: true
    type: str

re_type:
    choices:
    - python
    - posix_basic
    default: python
    description: Which type of escaping to use.
    type: str

Outputs

_value:
  description: Escaped string.
  type: str