import re


def _match_time(value):
    """Return the time (leaveby, arriveat) in value, None if no time in value."""
    mat = re.search(r"(\d{1,2}:\d{1,2})", value)
    if mat is not None and len(mat.groups()) > 0:
        return mat.groups()[0]
    return None