Updated: June 2015. Author Peter Kahrel updated this Short Cut to cover InDesign CC. Several examples have been added, and most examples are now analysed in more detail.
Updated: August 2010. Author Peter Kahrel updated this Short Cut to cover InDesign CS5.
Updated: November 2009. Author Peter Kahrel updated this Short Cut to address typos and reader comments.
GREP (short for "General Regular-Expression Print") is a powerful tool that lets you use wildcards ("jokers") to search and replace text. InDesign's GREP implementation can be used for text and also for formatting codes, finding patterns in text as well as literal text.
GREP moves beyond the restrictions that hampered earlier InDesign search features, but unfortunately it does have the reputation of being difficult to master. As with many things, it can be challenging to learn, but, fortunately, a lot can be done with surprisingly simple expressions. The aim of this Short Cut is to show how to create simple but powerful regular expressions.