GREP of the Month: Reveal Codes
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 is for members only. To continue reading, please sign in, or sign up for a membership today. Thanks for supporting CreativePro! CreativePro membership keeps you up-to-date with the technology, solutions, and resources to strengthen your professional development.
BECOME A MEMBER
For just $6.50/month (billed annually), you’ll get access to valuable benefits, including:
I’m such a fan of Peter Kahrel. His scripts are brilliant and in use here every day. Hugely grateful.
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!