Literals are preferred over use of the constructor: `/[^\/]*\/$/`, but I get the desire not to have to escape the forward slashes.