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.
View full size graphic
Using GREP style to format phone numbers with a character
style
- A.
- Character style
- B.
- GREP expression
For a video on creating GREP styles, see www.adobe.com/go/lrvid4028_id.
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.
Click New GREP Style.
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.
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.)
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.
Click OK.