def _null_regex(self, expr):
        """Implements a regex search with support for a null expression."""
        return "IF(ISNULL(%s), 0, %s REGEXP ?)" % (expr, expr)
dataset/ETHPy150Open earwig/bitshift/bitshift/query/nodes.py/_Node._null_regex/original