Andrei Alexandrescu: > foreach (i; 0 .. iter.captures) > writeln(iter.capture(i));
> "Capture" is the traditional term as far as I understand. I can't use > .length because it messes up with range semantics. "len" would be too > confusing. "ncaptures" is too cute. Nobody's perfect :o). >> "group" may be a struct that defines toString and can be cast to string, >> and also keeps the starting position of the group into the original string. > That sounds good. Well, then match() may return just a dynamic array of such groups/captures. So such array has both .length and opIndex. It looks simple :-) Bye, bearophile
