##! Please refer to the documentation at
##! https://coreruleset.org/docs/development/regex_assembly/.


##!^ ^
##!$ $

##! grab the path, except for the lat path segment (separate rule)
(.*)/
##!=>
##! skip the last path segment, if there is one (non-capturing group)
(?:[^?]+)?
##!=>
##! grab the query string, if there is one
(\?.*)?
