Regex fix to avoid matching a trailing slash.

The default regex `'([^/#?]*)'` inserted as a placeholder for matching named patterns matches empty components, such as a trailing slash. This means that a pattern such as `/foo/:bar/:baz` will match `/foo/BAR/`, while it should only match `foo/BAR/BAZ`.

Changing the regex to `'([^/#?]+)'` to require at least one character in the component keeps trailing slashes from matching the specified path.