2 Replies Latest reply on Apr 13, 2012 3:44 PM by Klindse704

    Adding GREP search to FindChangeByList script in CS4


      I'm trying to remove numbers from a baseball box score pulled from the Internet.

      The file has 10 numbers across separated by tabs and I only need six of the numbers not all 10


      St. Lucie Mets

      Player,Pos         AB     R     H     2B     3B     HR     RBI     BB     SO     AVG

      Daniel Muno, 2B    4     1     1     0     0     1     1     0     2     .259

      Robbie Shields, DH     4     0     2     1     0     0     0     0     1     .471


      This GREP search works in FindChange in InCopy/InDesign (using CS4)

      (\t\d) (\t\d) (\t\d) (\t\d) (\t\d) (\t\d) (\t\d) (\t\d) (\t\d)


      This works in the Change field

      $1 $2 $3 $7 $8 $9



      However, when I try to add this to a FindChangeByList script, it generates an error. So my syntax, logic or both is flawed.

      What should I do to fix it?


      grep    {findWhat:"(\t\d) (\t\d) (\t\d) (\t\d) (\t\d) (\t\d) (\t\d) (\t\d) (\t\d)"}    {changeTo:"$1 $2 $3 $7 $8 $9"}    {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false} Find all double spaces and replace with single spaces.


      Thank you,