<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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