Reply To: Grep Find/Replace, multiple formatting applied

Home Page / Forums / General InDesign Topics (CLOSED) / Grep Find/Replace, multiple formatting applied / Reply To: Grep Find/Replace, multiple formatting applied

#89150
Matt Isaac
Participant

I’m pretty sure this can only be done with two grep expressions first to change the K: (?<=\<p)K(?=a\>) second to change the a: (?<=\<pK)a\>
These can be combined into a single shortcut command if applied via script such as:
app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.findWhat = "(?<=<p)K(?=a>)";
app.changeGrepPreferences.fontStyle = "Italic";
app.changeGrep();

app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.findWhat = "(?<=<pK)a>";
app.changeGrepPreferences.position = Position.NORMAL;
app.changeGrep();

for information on installing and using the script see: https://creativepro.com/how-to-install-a-script-in-indesign-that-you-found-in-a-forum-or-blog-post.php

This article was last modified on October 19, 2016

Comments (0)

Loading comments...