//System.err.println("getRegexGroupIterator");
if (!isMatching()) {
//System.err.println("no match");
return null;
}
GroupCollection groups = match.get_Groups();
int c = groups.get_Count();
//System.err.println("groups: " + c);
if (c == 0) {
return EmptyIterator.getInstance();
} else {
StringValue[] groupArray = new StringValue[c-1];
IEnumerator e = groups.GetEnumerator();
int i=0;
// we're not interested in group 0
e.MoveNext();
e.get_Current();
while (e.MoveNext()) {