def METHOD_NAME(self, condition):
    oper = None
    val = None
    if condition[0] == "!":
        path = condition[1:]
        neg = True
    else:
        path = condition
        neg = False
    for op in OPERATORS:
        idx = path.rfind(op)
        if idx < 0:
            continue
        val = path[idx+len(op):].strip()
        path = path[:idx].strip()
        oper = op
        if op == "~":
            if not val.startswith(".*") and not val.startswith("^"):
                val = ".*" + val
            if not val.endswith(".*") and not val.endswith("$"):
                val = val + ".*"
        break
    path = normalize_jsonpath(path)
    try:
        jsonpath_expr = parse(path)
    except Exception as exc:
        raise ex.Error(exc)
    return neg, jsonpath_expr, oper, val