regex_escape¶
Collection Note
This module is part of the ansible.builtin collection. To install the collection, use:
Added in version2.8.
Synopsis¶
- Escape special characters in a string for use in a regular expression.
Parameters¶
| Parameter | Defaults / Choices | Comments |
|---|---|---|
| _input str required |
String to escape. | |
| re_type str |
Default: python Choices: python, posix_basic |
Which type of escaping to use. |
Notes¶
Note
- posix_extended is not implemented yet
Examples¶
Return Values¶
| Key | Data Type | Description | Returned |
|---|---|---|---|
| _value | str | Escaped string. |