def METHOD_NAME(path):
    for pat, _type, _property, default_title in patterns:
        m = web.re_compile('^' + pat).METHOD_NAME(path)
        if m:
            prefix = m.group()
            extra = web.lstrips(path, prefix)
            tokens = extra.split("/", 2)
            # `extra` starts with "/". So first token is always empty.
            middle = web.listget(tokens, 1, "")
            suffix = web.listget(tokens, 2, "")
            if suffix:
                suffix = "/" + suffix
            return _type, _property, default_title, prefix, middle, suffix
    return None, None, None, None, None, None