Thanks for coming to InDesignSecrets.com, the world's #1 resource for all things InDesign!

GREP of the Month: Reveal Codes

InDesign Magazine issue 76 coverThis article appeared in Issue 76 of InDesign Magazine.

Normally, you can’t target text with mixed formatting in a GREP search. But with this workaround, it’s a cinch.

A limitation of GREP searches (and of normal text searches too) is that everything you’re looking for must be in the same style. Thus, it’s not possible to formulate a GREP expression along the lines of “find certain punctuation in italic that is followed by a non-italic space.” This can be a bad limitation, but fortunately there’s a way around this problem: you can reveal all or some formatting codes.

. . . .

This article from InDesign Magazine is for InDesignSecrets premium subscribers only. To continue reading, please log in above, or sign up for a premium membership today! Thanks for supporting InDesignSecrets!

Peter Kahrel

Peter Kahrel

Peter Kahrel is a script developer at Typefi Systems. He is the author of several eBooks on InDesign and scripting, including GREP in InDesign, published by CreativePro Network. He also wrote the feature article on "Getting a Grip on GREP" in InDesign Magazine Issue 59. You can find a collection of his scripts at: https://creativepro.com/files/kahrel/
Peter Kahrel

Latest posts by Peter Kahrel (see all)

  • - November 30, -0001
Tags
Related Articles
Comments

2 Comments on “GREP of the Month: Reveal Codes

  1. This is such a great idea – I can’t believe it never occurred to me (:-) because there are so many times when I could have used it. It fits into the category of other tips that use an intermediate step to make something unique temporarily by adding ••• or some other odd code that you can easily strip out again.

    The moral is, if what you want to find can’t be done, remember to consider doing it in multiple steps.

    Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *