remove Filter

Remove all occurrences of a substring from a string.

Parameters

Parameter Required Description
substring Yes string String to remove.

Category

String Filters

Description

The remove filter removes all occurrences of a given substring from a string.

{{ "What is good is good." | remove: ' good' }}

Output

What is is.

If you want to remove just the first occurrence of a substring, use the remove_first filter instead.