def find_all(s, pattern):
    """
    return ordered list of indexes where [pattern] appears in [s];
    """
    shift_on_match = 1
    indexes = []
    i = re.search(pattern, s)
    if i:
        i, j, k = i.start(), i.end(), i.groups()
        indexes.append((i,j,k))
    return indexes

    return ordered list of indexes where [pattern] appears in [s];
    
recipes/Python/578087_Useful_Unrestricted_Grammar_/recipe-578087.py