@staticmethod
    def query_compute(value_a, value_b, query_method):
        if query_method == '*[]*' or query_method is None:
            return (value_b in value_a)
        elif query_method == '==':
            return (value_a == value_b)
        elif query_method == '=~':
            try:
                m = re.match(value_b, value_a)
                if m is not None:
                    return (m.end() ==len(value_a))
            except re.error:
                pass
        return False

##############################################################################

# Rich display for IPython
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/core/modules/basic_modules.py/String.query_compute/original