Search using grep expressions, Tips for constructing grep searches – Adobe InCopy CC 2015 User Manual
Page 208
205
Text
Last updated 6/13/2015
(Roman text only) Disregards search characters if they are part of a Roman word. For example, if you are searching for
any as a whole word, InDesign disregards many.
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.
Kana Sensitive
Distinguishes between hiragana and katakana. For example, if you search for Tango in hiragana, InDesign disregards
Tango in katakana.
Full-Width/Half-Width Sensitive
Distinguishes between half-width and full-width characters. For example, if you search for ka in half-width katakana,
InDesign disregards ka in full-width katakana.
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.
InDesign Secrets provides a list of GREP resources at
.
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.
3
In the Find What box, do any of the following to construct a GREP expression:
• Enter the search expression manually. (See
.)
• 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.
You can also use GREP Styles to apply a character style to text that conforms to a GREP expression. In fact, the GREP
Styles dialog box is a good way to test your GREP expression. Add the examples you want to find to a paragraph, and
then specify a character style and GREP expression in the GREP Styles dialog box. When you turn on Preview, you can edit
the expression until it affects all your examples properly.
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