1 Reply Latest reply on May 9, 2013 1:36 PM by -hans-

    Grep scripting bug?

    Marco Lugli Level 1

      The following grep search works fine from within Indesign (finds all prices that don't have the "€" symbol at the end):  ((\d+)?(\.?))+(\d{1,3}),(-)?(\d+)?(?!(.*)?(€))  If I try to translate the same search expression into a script, it doesn't work anymore:  ((\\d+)?(\\.?))+(\\d{1,3}),(-)?(\\d+)?(?!(.*)?(€))  How could this be possible? Am I doing something wrong or is it a bug of the software?  Any suggestions would be much appreciated  Thanks in advance

        • 1. Re: Grep scripting bug?
          -hans- Level 4

          CS 5.5 win7

          works here!? perhaps a mistake in scriptimplementation?

           

          app.findGrepPreferences=app.changeGrepPreferences=null;

          app.findGrepPreferences.findWhat="((\\d+)?(\\.?))+(\\d{1,3}),(-)?(\\d+)?(?!(.*)?(€))";

          toFind = app.activeDocument.findGrep();

          alert(toFind.length)