Book description
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.
Publisher resources
Table of contents
- Cover Page
- Title Page
- Copyright Page
- Detailed Contents
- Power Searching with GREP
- GREP by Example
- The Basics: The Find/Change Dialog
-
Wildcards (or Character Classes)
- Any Character
- Any Uppercase Letter
- Any Lowercase Letter
- Any Letter
- Any Digit
- Any Word Character
- Accented Letters
- Accented Letters: Character Equivalents
- Digraphs
- Any Whitespace
- Any Dash
- Quotation Marks
- Any Punctuation
- Opening and Closing Punctuation
- Homemade Wildcards: Character Classes
- Negative Character Classes
- Alternatives: Sort of a Wildcard
- Locations
- Repeat: Sequences of Characters
- Repeating a Pattern a Specific Number of Times
- Referring to Wildcards: Back-Referencing
- Finding Formatted Text
- Replacing with Wildcards
- Splitting Up Complex GREP Expressions
- Chaining GREP Queries
- Applying Styles with GREP Find/Change
- Look Ahead: Match Selectively
- Look Behind
- Lookaround
- Lookaround and Formatting
- Replacing Using Location Markers
- Single-line and Multiline
- Conditional GREP Expressions
- GREP Styles
-
Troubleshooting
- Patch to InDesign’s Latest Version
- Escape Characters
- GREP Is Case-Sensitive
- Hyphens in Character Classes
- The Dot Does Not Match Footnote Markers
- Parentheses
- Split Complex Expressions
- Spaces
- You’re Trying a GREP Search Using the Text Search Tab
- Try GREP Expressions on a Small Sample
- Character-Class Mismatches
- Resources
- Quick Reference
Product information
- Title: GREP in InDesign
- Author(s):
- Release date: October 2008
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596156008
You might also like
book
GREP in InDesign CS3
GREP (short for "General Regular-Expression Print") is a powerful tool that lets you use wildcards ("jokers") …
video
InDesign CC In Depth
Master InDesign CC on your terms with this one-of-a-kind video training course. Adobe InDesign is the …
book
Scripting InDesign CS3/4 with JavaScript
InDesign provides a powerful set of tools for producing beautiful documents. While you can certainly do …
video
InDesign CC Essentials
Master InDesign CC on your terms with this one-of-a-kind video training course. Adobe InDesign is the …