title: How to store $2 value to variable in InDesign GREP find / change using javascript
body: <p>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</p>
  
  <p>simple example:</p>
  
  <pre><code>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)
  </code></pre>