I want to put all text with character style "test" applied between brackets.
This is the related part of my script:
app.findGrepPreferences = NothingEnum.nothing;
app.changeGrepPreferences = NothingEnum.nothing;
app.findGrepPreferences.appliedCharacterStyle = 'test';
app.changeGrepPreferences.changeTo = "<$0>";
The problem is that only the fist part of the found text appears between the brackets.
In my understanding, $0 should replicate the whole text string found.
It also happens when performing this search in the user interface (InDesign CS5).
Thanks for your help,
I'm getting some odd results if I leave the FindWhat field blank. Try explicitly setting the findWhat to ".+".
Yes, that does the job, thank you very much!