--- url: https://developer.youcan.shop/themes/filters/strings/removeLast.md --- # Remove Last Removes the last occurrence of a substring from a string. ```liquid {{ string | remove_last: substring }} ``` ## Example ```liquid {{ 'red-blue-red' | remove_last: 'red' }} ``` ::: tip Output ```html red-blue- ``` :::