parent
2e29993729
commit
41a417be1f
|
@ -559,6 +559,8 @@ To replace text in a string with regex, use the "regex_replace" filter::
|
|||
.. note:: Prior to ansible 2.0, if "regex_replace" filter was used with variables inside YAML arguments (as opposed to simpler 'key=value' arguments),
|
||||
then you needed to escape backreferences (e.g. ``\\1``) with 4 backslashes (``\\\\``) instead of 2 (``\\``).
|
||||
|
||||
.. versionadded:: 2.0
|
||||
|
||||
To escape special characters within a regex, use the "regex_escape" filter::
|
||||
|
||||
# convert '^f.*o(.*)$' to '\^f\.\*o\(\.\*\)\$'
|
||||
|
|
Loading…
Reference in New Issue