def search(self, target):
        target = target.strip()
        if target[0] == target[-1] == '/' and len(target) > 1:
            target = target[1:-1]
        else:
            target = re.escape(target)
        pattern = re.compile(target, re.IGNORECASE)
        return [s for s in self if pattern.search(s)]
dataset/ETHPy150Open Exa-Networks/exabgp/lib/exabgp/dep/cmd2.py/History.search/original