Search using grep expressions – Adobe InDesign CS3 User Manual
Page 143

INDESIGN CS3
User Guide
136
Include Hidden Layers
Searches for text on layers that have been hidden using the Layer Options dialog box.
When text on a hidden layer is found, you can see highlighting where the text appears, but you cannot see the text.
You can replace text on hidden layers.
Include Master Pages
Searches for text on master pages.
Include Footnotes
Searches footnote text.
Case Sensitive
Searches for only the word or words that exactly match the capitalization of the text in the Find
What box. For example, a search for PrePress won’t find Prepress, prepress, or PREPRESS.
Whole Word
Disregards search characters if they are part of another word. For example, if you search for any as
a whole word, InDesign disregards many.
Search using GREP expressions
On the GREP tab of the Find/Change dialog box, you can construct GREP expressions to find alphanumeric strings
and patterns in long documents or many open documents. You can enter the GREP metacharacters manually or
choose them from the Special Characters For Search list. GREP searches are case-sensitive by default.
1
Choose Edit > Find/Change, and click the GREP tab.
2
At the bottom of the dialog box, specify the range of your search from the Search menu, and click icons to include
locked layers, master pages, footnotes, and other items in the search. (See “Search options for finding and changing
text” on page 135.)
3
In the Find What box, do any of the following to construct a GREP expression:
•
Enter the search expression manually. (See “Metacharacters for searching” on page 140.)
•
Click the Special Characters For Search icon to the right of the Find What option and choose options from the
Locations, Repeat, Match, Modifiers, and Posix submenus to help construct the search expression.
4
In the Change To box, type or paste the replacement text.
5
Click Find.
6
To continue searching, click Find Next, Change (to change the current occurrence), Change All (a message
indicates the total number of changes), or Change/Find (to change the current occurrence and search for the next one.
Tips for constructing GREP searches
Here are some tips for constructing GREP expressions.
•
Many searches under the GREP tab are similar to those under the Text tab, but be aware that you need to insert
different codes depending on which tab you’re using. In general, the Text tab metacharacters begin with a ^ (such
as ^t for a tab) and GREP tab metacharacters begin with a \ (such as \t for a tab). However, not all metacharacters
follow this rule. For example, a paragraph return is ^p in the Text tab and \r in the GREP tab. For a list of the
metacharacters used for the Text and GREP tabs, see “Metacharacters for searching” on page 140.
•
To search for a character that has symbolic meaning in GREP, enter a backslash (\) before the character to indicate
that the character that follows is literal. For example, a period ( . ) searches for any character in a GREP search; to
search for an actual period, enter “\.”
•
Save the GREP search as a query if you intend to run it often or share it with someone else. (See “Find/change
using queries” on page 146.)