beautypg.com

Metacharacters for searching, Enter the search expression manually. (see – Adobe InDesign CS4 User Manual

Page 164

background image

156

USING INDESIGN CS4

Text

Metacharacters for searching

Metacharacters represent a character or symbol in InDesign. Metacharacters in the Text section of the Find/Change
dialog box begin with a caret

(^); metacharacters in the GREP section begin with a tilde (~) or backslash (\). You can

type metacharacters in the Text tab or GREP tab of the Find/Change dialog box.

Save time fixing punctuation errors by saving search strings as queries.

Multiline off

(?-m)

(?-m)^\w+

One Two Three Four Five Six
Seven Eight

One Two Three Four Five Six Seven
Eight

Single-line on

(?s)

(?s)c.a

The searches for any character ( . ) between the
letters c and a. The (?s) expression matches any
character, even if it falls on the next line.

(.) matches anything other than a paragraph
return. (?s)(.) matches anything, including
paragraph returns.

abc abc abc abc

abc abcabc abc

Single-line off

(?-s)c.a

abc abc abc abc

abc abc abc abc

Repeat number of
times

{ }

b{3} matches exactly 3 times

b(3,} matches at least 3 times

b{3,}? matches at least 3 times (shortest match)

b{2,3} matches at least 2 times and not more
than 3

b{2,3}? matches at least 2 times and not more
than 3 (shortest match)

abbc abbbc abbbbc
abbbbbc

abbc abbbc abbbbc abbbbbc

abbc abbbc abbbbc abbbbbc

abbc abbbc abbbbc abbbbbc

abbc abbbc abbbbc abbbbbc

abbc abbbc abbbbc abbbbbc

Character:

Text tab metacharacter:

GREP tab metacharacter:

Tab Character

^t

\t

End of Paragraph

^p

\r

Forced Line Break

^n

\n

Any Page Number

^#

~#

Current Page Number

^N

~N

Next Page Number

^X

~X

Previous Page Number

^V

~V

* Any Variable

^v

~v

Section Marker

^x

~x

* Anchored Object Marker

^a

~a

* Footnote Reference Marker

^F

~F

* Index Marker

^I

~I

Bullet Character

^8

~8

Expression

Search string

Sample text

Matches (in bold)

Updated 18 June 2009