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
40 Algorithms Every Programmer Should Know
Learn algorithms for solving classic computer science problems with this concise guide covering everything from fundamental …
book
Designing Data-Intensive Applications
Data is at the center of many challenges in system design today. Difficult issues need to …
book
Learning SQL, 3rd Edition
As data floods into your company, you need to put it to work right away—and SQL …
book
Linux Cookbook, 2nd Edition
This handy cookbook teaches new-to-intermediate Linux users the essential skills necessary to manage a home or …