Adobe InDesign CC 2015 User Manual Page 233

  • Download
  • Add to my manuals
  • Print
  • Page
    / 643
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 232
228
Tex t
Last updated 6/6/2015
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 Metacharacters for searching.)
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.
7 The Find/Change dialog in InDesign has two search direction buttons - Forward and Backward. As search Forward
is enabled by default, you can switch to Backward to reverse the flow of the search. The new functionality helps you
search strings in Text, GREP, and Glyph tabs.
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 youre 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.
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 items
using queries.)
Use parentheses to divide your search into subexpressions. For example, if you want to search for “cat” orcot, you
can use the c(a|o)t string. Parentheses are especially useful to identify groupings. For example, searching for “the
(cat) and the (dog)” identifies “cat” as Found Text 1 and “dog” as Found Text 2. You can use the Found Text
expressions (such as $1 for Found Text 1) to change only part of the found text.
GREP search examples
Follow these examples to learn how to take advantage of GREP expressions.
Example 1: Finding text within quotation marks
Suppose you want to search for any word enclosed in quotation marks (such as “Spain”), and you want to remove the
quotation marks and apply a style to the word (so that it becomes Spain instead of “Spain”). The expression (")(\w+)(")
includes three groupings, as indicated by parentheses ( ). The first and third groupings search for any quotation mark,
and the second grouping searches for one or more word characters.
Page view 232
1 2 ... 228 229 230 231 232 233 234 235 236 237 238 ... 642 643

Comments to this Manuals

No comments