regex¶
Collection Note
This module is part of the ansible.builtin collection. To install the collection, use:
Synopsis¶
- Compare string against regular expression using Python's match or search functions.
Parameters¶
| Parameter | Defaults / Choices | Comments |
|---|---|---|
| _input string required |
String to match. | |
| ignorecase boolean |
Use case insensitive matching. | |
| match_type string |
Default: search Choices: match, search |
Decide which function to be used to do the matching. |
| multiline boolean |
Match against multiple lines in string. | |
| pattern string required |
Regex to match against. |
Examples¶
Return Values¶
| Key | Data Type | Description | Returned |
|---|---|---|---|
| _value | boolean | Returns V(True) if there is a match, V(False) otherwise. |
Authors¶
- Ansible Core