Reply To: GREP replace footnote>punctuation with punct>footnote

Home Page / Forums / General InDesign Topics (CLOSED) / GREP replace footnote>punctuation with punct>footnote / Reply To: GREP replace footnote>punctuation with punct>footnote

#51581

Hello,

With GREP, it is impossible, because footnote marker can't be entered in the Change To box. You can do it with a script.

I use this one :

app.findGrepPreferences = null;
app.changeGrepPreferences = null;
app.findChangeGrepOptions.includeFootnotes = false;

var pattern = “[,;.]+~F”;

app.findGrepPreferences.findWhat = pattern;
var finds = app.activeDocument.findGrep();
for (var i = finds.length-1 ; i>=0 ; i–)
  {
  finds[i].characters.item(-1).move(
    LocationOptions.before,
    finds[i].characters.item(0)
    );
  }
app.findGrepPreferences = null;
app.changeGrepPreferences = null;

This article was last modified on January 21, 2010

Comments (0)

Loading comments...