11 Replies Latest reply on Dec 16, 2012 8:21 PM by LukeF11

    GREP find/change problem

    LukeF11 Level 1

      Hi, am trying to execute InDesign's default find/change AppleScript script to fix many formatting issues in a large document. One of them is occurences of a two-digit dollar figure followed by a comma (eg. "$10,") that needs to be changed to have no comma.

       

      Using GREP I can pick it up by finding "\$\d\d," but when I replace it with "\$\d\d" I get the actual string "\$\d\d". IE. "$10," becomes "\$\d\d" rather than "$10". Am I misundersting how the 'change' part of GREP works? Can any one advise?

       

      FYI the line in the find/change support .txt doc is:

       

      grep{find what:"\\$\\d\\d,"}{change to:"\\$\\d\\d"}{include footnotes:true, include master pages:true, include hidden layers:true, whole word:false}Remove commas after prices.

       

      ...which includes extra backslashes to escape the backslashes that are part of the GREP expression.

       

      Any help much appreciated!

       

      Thanks.