def match_re(lines = None, res = None):
    """
    """
    if not is_List(lines):
        lines = string.split(lines, "\n")
    if not is_List(res):
        res = string.split(res, "\n")
    if len(lines) != len(res):
        return
    for i in range(len(lines)):
        s = "^" + res[i] + "$"
        try:
            expr = re.compile(s)
        except re.error, e:
            msg = "Regular expression error in %s: %s"
            raise re.error, msg % (repr(s), e[0])
        if not expr.search(lines[i]):
            return
    return 1
dataset/ETHPy150Open adblockplus/gyp/test/lib/TestCmd.py/match_re/original