angular-ui/ui-router — pull request #1094 by tcard (2014-05-22 09:53:03+00:00)
Title: Handle regexp patterns with subgroups.

Currently, in UrlMatcher, subgrouping in regexp patterns is not supported. This seems to be an expected behavior; there is a check+throw for it, and even a test (although I find the thrown error "Unbalanced capture group" misleading).

This request changes this behavior. Subgroups are allowed in regexps, and such regexps work just like subgroup-free ones.

So:
- Pattern: `/url/{matchedParam:(([a-z])[a-z]*)}/child/{childParam}`
- with URL: `/url/someword/child/childParam`
- yields: `{matchedParam: 'someword', childParam: 'childParam'}`

I don't see a reason for this not to be the case, as subgroups are a core element of regular expressions; if you do, I would be grateful if you explained it.