python: convert format string to regular expression,print(pattern.match('something/foo-en-gb/file.txt').groupdict())