]) The final URL is formatted with `str.format` and the substrings that match the capturing groups. In the above example, a request to "/a/b/c" would be formatted like:: str.format("/{1}/{0}/{2}", "a", "b", "c") # -> "/b/a/c" Use Python's :ref:`format string syntax ` to customize how values are substituted. .. versionchanged:: 4.5 Added support for substitutions into the destination URL. .. versionchanged:: 5.0 If any query arguments are present, they will be copied to the destination URL. Tr