def _parse_line(rx, line):
    """
    Do a regex search against given regex and
    return the match result.

    """

    match = rx.search(line)
    if match:
        return match
    # if there are no matches
    return None