Reply To: GREP Replace Metacharacters

#81678
Peter Kahrel
Participant

A. — This does doesn’t work in InDesign. Several feature requests have been submitted without much effect (please add your own).

One workaround, if the font you use has All Caps, is to look for ^ and apply allcaps.

The other workaround is a script, which can be very simple in principle:

app.findGrepPreferences = null;
app.findGrepPreferences.findWhat = '^l';
found = app.selection[0].findGrep();
for (i = 0; i < found.length; i++) {
  found[i].contents = found[i].contents.toUpperCase();
}

This targets the current selection. To target the document, replace app.selection[0] with app.activeDocument in line 3.

This article was last modified on February 9, 2016

Comments (0)

Loading comments...