mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
parent
3211397cef
commit
8255901b33
1 changed files with 23 additions and 0 deletions
|
@ -405,6 +405,29 @@ Returns:
|
|||
None
|
||||
|
||||
|
||||
.. jinja_ref:: regex_replace
|
||||
|
||||
``regex_replace``
|
||||
-----------------
|
||||
|
||||
.. versionadded:: 2017.7.0
|
||||
|
||||
Searches for a pattern and replaces with a sequence of characters.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: jinja
|
||||
|
||||
{% set my_text = 'yes, this is a TEST' %}
|
||||
{{ my_text | regex_replace(' ([a-z])', '__\\1', ignorecase=True) }}
|
||||
|
||||
Returns:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
yes,__this__is__a__TEST
|
||||
|
||||
|
||||
.. jinja_ref:: uuid
|
||||
|
||||
``uuid``
|
||||
|
|
Loading…
Add table
Reference in a new issue