private func replacementPredicate(forEndsWithPredicate predicate: NSComparisonPredicate) -> NSPredicate? {
        if let constantValue = predicate.rightExpression.constantValue {
            let endsWithRegex = ".*\(constantValue)"
            return replacementPredicate(
                forComparisonPredicate: predicate,