def get_rules(self, description=None):
        if description:
            rules = []
            description = description.lower()
            for i in range(0, len(self.extract_rules)):
                if self.extract_rules[i]['regex'].search(description):
                    rules.append(self.extract_rules[i])
        else:
            rules = self.extract_rules

        return rules
Returns a list of extraction rules that match a given description.
dataset/ETHPy150Open devttys0/binwalk/src/binwalk/modules/extractor.py/Extractor.get_rules