• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Grep scripting bug?

Explorer ,
May 09, 2013 May 09, 2013

Copy link to clipboard

Copied

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

TOPICS
Scripting

Views

382

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
May 09, 2013 May 09, 2013

Copy link to clipboard

Copied

LATEST

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)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines