'Determine if directive passes a filter.
:param str match: Augeas path
:param list filter: list of tuples of form
[("lowercase if directive", set of relevant parameters)]'

def _pass_filter(self, match, filter_):

    match_l = match.lower()
    last_match_idx = match_l.find(filter_[0])
    while (last_match_idx != (-1)):
        end_of_if = match_l.find('/', last_match_idx)
        expression = self.aug.get((match[:end_of_if] + '/arg'))
        if expression.startswith('!'):
            if (expression[1:] in filter_[1]):
                return False
        elif (expression not in filter_[1]):
            return False
        last_match_idx = match_l.find(filter_[0], end_of_if)
    return True
