Do apex regular expressions support named groups? Similar to http://download.oracle.com/javase/7/docs/api/java/util/regex/Matcher.html#group%28java.lang.String%29?
Example (?<name>X)
The syntax seems to be supported but I couldn't find a way to reference groups by name: https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_pattern_and_matcher_matcher_methods.htm
Pattern oTestPattern = Pattern.compile('(?<name>X)');
Matcher oMatcher = oTestPattern.matcher('X');
System.assert(false, oMatcher.groupCount());