'Narrow query\'s scope.'

def In(self, regex):

    self.path.append(regex)
    new_current_dicts = []
    for current_dict in self.current_dicts:
        for (key, value) in current_dict.iteritems():
            m = re.match(regex, key)
            if (m and (m.string == m.group(0))):
                new_current_dicts.append(value)
    self.current_dicts = new_current_dicts
    return self
