def make_regexps_for_path(path):
    """
    given a path like a/b/c/d/e.ipynb, return
    many regexps mathing this path. specifically,
    [^/]+/b/c/d/e.ipy
    a/[^/]+/c/d/e.ipy
    a/b/[^/]+/d/e.ipy
    a/b/c/[^/]+/e.ipy
    a/b/c/d/[^/]+
    """
    components = path.split("/")
    patterns = []
    for i in range(len(components)):
        pat = components[:i] + [ "[^/]+" ] + components[i+1:]
        patterns.append("/".join(pat))
    return patterns