replace

Replace all occurrences of string_to_find with instances of replacement_string.

Specification

{{ text | replace: string_to_find, replacement_string='' }}

Parameter Description Example Values
text (required) The source text. “We like birthday parties!”
string_to_find The string you want replaced. “We like”
replacement_string The new string to replace all occurrences of string_to_find. “Everyone loves”

Examples

{{ 'We like birthday parties!' | replace: 'We like', 'Everyone loves' }}

This will output “Everyone loves birthday parties!”