If I compile a regex such as:
pat = re.compile("/resource/([a-z]*)/")
Is it possible to get matching components of this pattern (e.g., "/resource/", "([a-z]*)", "/") or some equivalent without executing match, search, or some other regex call? I want to know how the pattern "breaks out".
For example, the object's groups attribute tells me there is 1 group. But not much more information.

shimfunc("/r/([a-z]*)/", [ ("foo", ID1), ("bar", ID2)])==> URL pattern is "/r/", <group>, "/" ==> so generate/return { "/r/foo/": ID1, "/r/bar/": ID2 } to be used later.