def METHOD_NAME(pattern, text):
    """checks if the expected output is eqal to the actualoutput using a reqex
        use the literal [VAR] if the part of the output is not expected to be the same all the time.
    """
    if len(pattern) != len(text):
        print('Number of lines differ. Expected output has %s lines whereas actual has %s lines.' % (len(pattern), len(text)), file=sys.stderr)
        return False
    for i in range(len(pattern)):
        T = text[i]
        P = pattern[i]
        if T == P :
            continue
        else :
            if '[VAR]' not in P:
                print('Line %s is different between expected and actual outputs.' % (i), file=sys.stderr)
                return False
            else:
                P = (re.escape(P)).replace('\\[VAR\\]', "[+-]?(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?")
                r = re.compile(P)
                if re.match(r, T) == None:
                    print('Line %s is different (REGEX) between expected and actual outputs.' % (i), file=sys.stderr)
                    return False
    return True