1``replace`` 2=========== 3 4The ``replace`` filter formats a given string by replacing the placeholders 5(placeholders are free-form): 6 7.. code-block:: jinja 8 9 {{ "I like %this% and %that%."|replace({'%this%': foo, '%that%': "bar"}) }} 10 11 {# outputs I like foo and bar 12 if the foo parameter equals to the foo string. #} 13 14 {# using % as a delimiter is purely conventional and optional #} 15 16 {{ "I like this and --that--."|replace({'this': foo, '--that--': "bar"}) }} 17 18 {# outputs I like foo and bar #} 19 20Arguments 21--------- 22 23* ``from``: The placeholder values 24 25.. seealso:: :doc:`format<format>` 26