4 Replies Latest reply on Dec 1, 2015 8:40 AM by frengold1963

    When I try to run a FindChangeByList.jsx in InDesignCS5.5 I get a syntax error in a Grep search

    frengold1963

      I'm trying to find text between to "Start" and "End" strings and change the selected text Character Style.

      I can run the following Find/Change in InDesign and it works as expected:

      Find What:  (?s)(?<=Begin--FBC--Amway Top 25 Poll).*?(?=End--FBC--Amway Top 25 Poll)

      Change format: Paragraph Style: FBC-Top 25

       

      But when I use the following text in the FindChangeList.txt file (running FindChangeByList.jsx) I get a syntax error, I'm not sure if it's the grep syntax in the FindWhat parameter or the changeTo syntax.

       

      grep {findWhat:”(?s)(?<=Begin--FBC--Amway Top 25 Poll).*?(?=End--FBC--Amway Top 25 Poll)”} {appliedParagraphStyle:”FBC-Top 25”} {includeFootnotes:false, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}

      I have also tried:

      grep {findWhat:”(?s)(?<=Begin--FBC--Amway Top 25 Poll).*?(?=End--FBC--Amway Top 25 Poll)”} {changeTo:”$0”,appliedParagraphStyle:”FBC-Top 25”} {includeFootnotes:false, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}

       

      I'm beginning to think it has something to do with the way the findWhat: is formatted but I'm not a Grep expert and I don't know what to change it to.

       

      Any help would be greatly appreciated.

      Steve

       

      PS The FindChangeList.txt parameters in the original txt file are tab separated