I'm writing InDesign javascript, that do GREP find / change - actually for now I need only find some text and save to my script variable what grep found in $2 value - everything else for my script I know how to do - so all I need for now is to find out how to get this $2
simple example:
app.findGrepPreferences = NothingEnum.nothing;
app.findGrepPreferences.findWhat = "(\\d)+(\\d)";
found = app.activeDocument.findGrep();
...
found[0].contents; // this store entire string with both digits and plus, and I need only $2 value (second digit in this case)