Not sure what the question marks in the `[^\/?]` portions are for. Shouldn't this just be `/^\/[^\/]+\/([^\/]+)(\/?)$/`?