master: Fix regexp to retrieve the key (trailing slash not mandatory).