remove_first Filter

Remove the first occurrence of a substring from a string.

Parameters

Parameter Required Description
substring Yes string String to remove.

Category

String Filters

Description

The remove_first filter removes the first occurrence of a given substring that it finds in a string.

{{ "What is it that you do do?" | remove: 'do' }}

Output

What is it that you do?

If you want to remove all occurrences of a substring, use the remove filter instead.