2 Replies Latest reply on Mar 14, 2013 11:38 PM by Peter Bossens

    Grep & AppliedCharacterStyle

    Peter Bossens Level 1

      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,