def find_one ( line , lookup ) : match = re . search ( lookup , line ) if match : if match . group ( 1 ) : return match . group ( 1 ) return False
line match return the line python
regexp search with one value to return .
def find_one(line, lookup):
        """
        regexp search with one value to return.

        :param line: Line
        :param lookup: regexp
        :return: Match group or False
        """
        match = re.search(lookup, line)
        if match:
            if match.group(1):
                return match.group(1)
        return False