def remove(self, triple, context=None):
        (subject, predicate, object_) = triple
        if isinstance(subject, REGEXTerm) or \
            isinstance(predicate, REGEXTerm) or \
            isinstance(object_, REGEXTerm) or \
                (context is not None
                 and isinstance(context.identifier, REGEXTerm)):
            # One or more of the terms is a REGEX expression, so we must
            # replace it / them with wildcard(s)and match after we query.
            s = not isinstance(subject, REGEXTerm) and subject or None
            p = not isinstance(predicate, REGEXTerm) and predicate or None
            o = not isinstance(object_, REGEXTerm) and object_ or None
            c = (context is not None
                 and not isinstance(context.identifier, REGEXTerm)) \
                and context \
                or None

            removeQuadList = []
            for (s1, p1, o1), cg in self.storage.triples((s, p, o), c):
                for ctx in cg:
                    ctx = ctx.identifier
                    if regexCompareQuad(
                            (s1, p1, o1, ctx),
                            (subject, predicate, object_, context
                             is not None or context.identifier or context)):
                        removeQuadList.append((s1, p1, o1, ctx))
            for s, p, o, c in removeQuadList:
                self.storage.remove((s, p, o), c and Graph(self, c) or c)
        else:
            self.storage.remove((subject, predicate, object_), context)
dataset/ETHPy150Open RDFLib/rdflib/rdflib/plugins/stores/regexmatching.py/REGEXMatching.remove/operator `and` -> `or`