GREP in InDesign CS3

Peter Kahrel

Abstract

GREP (short for "General Regular-Expression Print") is a powerful tool that lets you use wildcards ("jokers") to search and replace text. InDesign CS3s 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.

Power Searching with Regular Expressions

The next section offers a preview, a quick illustration of a handful of useful features of GREP that should win you over straight away. This section is followed by a section that outlines the organization of GREP's dialog (or "interface"), which, if you're familiar with the Text Find/Change dialog, you can skip altogether. We discuss here how GREP operators can be picked from lists (you don't have to remember much!) and how Unicode characters are entered. After that, starting at the section "Wildcards," InDesign's GREP features are discussed in detail. The section "Advanced Techniques" discusses some aspects of GREP that are probably ...

Get GREP in InDesign CS3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.