docs: def get_pattern(self, url):
          """Return the path part of the URL with the last element replaced with its pattern in a regex-like format:
          \l -> lowercase letters, same as [a-z]+
          \L -> uppercase letters, same as [A-Z]+
          \i -> letters ignoring case, same as [a-zA-Z]+
          \d -> digits, same as \d+
          \w -> word characters (letters, digits, underscores), same as \w+
          All other characters match themselves
          """
          path = urlparse(url).path
          directories, filename = os.path.split(path)
          if len(filename) > 0:
              pattern = self.get_pattern_for_filename(filename)
              if directories[-1] != "/":
                  directories += "/"
              return directories + pattern
          else:
              return self.get_pattern_for_directory(directories)