Returns the list of contiguous string matches of r in s,
    or None if r does not successively match the entire s.

def matchall(r, s, flags=0):
    """
    Returns the list of contiguous string matches of r in s,
    or None if r does not successively match the entire s.
    """
    try:
        return [m.group(0) for m in matchiter(r, s, flags)]
    except ValueError:
        return None