Returns True if the pattern matches the string

def match(self, string):
        """Returns True if the pattern matches the string"""
        if self.casesensitive:
            return fnmatch.fnmatch(string, self.pattern)
        else:
            return fnmatch.fnmatch(string.lower(), self.pattern.lower())