beautypg.com

Create grep styles – Adobe InDesign CS5 User Manual

Page 218

background image

212

USING INDESIGN

Styles

Last updated 11/16/2011

Create GREP styles

GREP is an advanced, pattern-based search technique. You can use GREP styles to apply a character style to text that
conforms to the GREP expression you specify. For example, suppose you want to apply a character style to all the
phone numbers in text. When you create a GREP style, you select the character style and specify the GREP expression.
All paragraph text that matches the GREP expression is formatted with the character style.

Using GREP style to format phone numbers with a character style

A. Character style B. GREP expression

For a video tutorial on creating GREP styles, see

www.adobe.com/go/lrvid4028_id

.

David Blatner provides real-world examples of GREP styles at

5 Cool Things You Can Do with GREP Styles

. Cari

Jansen provides a four-part series about GREP styles that begins at

Introducing GREP Styles

.

1 Do one of the following:

To apply GREP styling to individual paragraphs, select the paragraphs and choose Grep Styles from the
Paragraph or Control panel menu.

To use GREP styles in a paragraph style, create or edit a paragraph style, and click the GREP Styling tab on the
left side of the Paragraph Style Options dialog box.

2 Click New GREP Style.

3 Click to the right of Apply Style, and then specify a character style. If you haven’t created a character style to use,

choose New Character Style and specify the formatting you want to use.

4 Click to the right of To Text and do any of the following to construct a GREP expression:

Enter the search expression manually. (See “

Metacharacters for searching

” on page 169.)

Click the Special Characters For Search icon to the right of the To Text field. Choose options from the Locations,
Repeat, Match, Modifiers, and Posix submenus to help construct the GREP expression.

5 Click OK.

B

A