PDF (adobe.com)

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.

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

Caret Character

^^

\^

Backslash Character

\

\\

Copyright Symbol

^2

~2

Ellipsis

^e

~e

Tilde

~

\~

Paragraph Symbol

^7

~7

Registered Trademark Symbol

^r

~r

Section Symbol

^6

~6

Trademark Symbol

^d

~d

Open Parenthesis Character

(

\(

Close Parenthesis Character

)

\)

Open Brace Character

{

\{

Close Brace Character

}

\}

Open Bracket Character

[

\[

Close Bracket Character

]

\]

Em Dash

^_

~_

En Dash

^=

~=

Discretionary Hyphen

^-

~-

Nonbreaking Hyphen

^~

~~

Em Space

^m

~m

En Space

^>

~>

Third Space

^3

~3

Quarter Space

^4

~4

Sixth Space

^%

~%

Flush Space

^f

~f

Hair Space

^|

~|

Nonbreaking Space

^s

~s

Nonbreaking Space (fixed width)

^S

~S

Thin Space

^<

~<

Figure Space

^/

~/

Punctuation Space

^.

~.

^ Clipboard Contents, Formatted

^c

~c

^ Clipboard Contents, Unformatted

^C

~C

Any Double Quotation Mark

"

"

Any Single Quotation Mark

'

'

Straight Double Quotation Mark

^"

~"

Double Left Quotation Mark

^{

~{

Double Right Quotation Mark

^}

~}

Straight Single Quotation Mark

^'

~'

Single Left Quotation Mark

^[

~[

Single Right Quotation Mark

^]

~]

Standard carriage return

^b

~b

Column Break

^M

~M

Frame Break

^R

~R

Page Break

^P

~P

Odd Page Break

^L

~L

Even Page Break

^E

~E

Discretionary Line Break

^j

~k

Right Indent Tab

^y

~y

Indent to Here

^i

~i

End Nested Style Here

^h

~h

Nonjoiner

^k

~k

* Running header (paragraph style) variable

^Y

~Y

* Running header (character style) variable

^Z

~Z

* Custom text variable

^u

~u

* Last page number variable

^T

~T

* Chapter number variable

^H

~H

* Creation date variable

^S

~S

* Modification date variable

^o

~o

* Output date variable

^D

~D

* File name variable

^l (lowercase L)

~l (lowercase L)

* Any Digit

^9

\d

* Any character that is not a digit

 

\D

* Any Letter

^$

[\l\u]

* Any Character

^?

. (inserts period in Change To)

* White Space (any space or tab)

^w

\s (Inserts space in Change To)

* Any character that is not a white space

 

\S

* Any word character

 

\w

* Any character that is not a word character

 

\W

* Any uppercase letter

 

\u

* Any character that is not an uppercase letter

 

\U

* Any lowercase letter

 

\l

* Any character that is not a lowercase letter

 

\L

^ All Found Text

 

$0

Found Text 1-9

 

$1 (specifies the number of the grouping found, such as $3 for the third grouping; groupings are enclosed in parentheses)

* Kanji

^K

\K

* Beginning of Word

 

\<

* End of Word

 

\>

* Word Boundary

 

\b

* Opposite of Word Boundary

 

\B

* Beginning of Paragraph

 

^

* End of Paragraph [location]

 

$

* Zero or One Time

 

?

* Zero or More Times

 

*

* One or More Times

 

+

* Zero or One Time (Shortest Match)

 

??

* Zero or More Times (Shortest Match)

 

*?

* One or More Times (Shortest Match)

 

+?

* Marking Subexpression

 

( )

* Non-marking Subexpression

 

(?: )

* Character Set

 

[ ]

* Or

 

|

* Positive Lookbehind

 

(?<= )

* Negative Lookbehind

 

(?<! )

* Positive Lookahead

 

(?= )

* Negative Lookahead

 

(?! )

* Case-insensitive On

 

(?!)

* Case-insensitive Off

 

(?-!)

* Multiline On

 

(?m)

* Multiline Off

 

(?-m)

* Single-line On

 

(?s)

* Single-line Off

 

(?-s)

* Any alphanumeric character

 

[[:alnum:]]

* Any alphabetic character

 

[[:alpha:]]

* Any blank character, either space or tab

 

[[:blank:]]

* Any control character

 

[[:control:]]

* Any graphical character

 

[[:graph:]]

* Any printable character

 

[[:print:]]

* Any punctuation character

 

[[:punct:]]

* Any character whose code is greater than 255 (applies only to the wide character traits classes)

 

[[:unicode:]]

* Any hexadecimal digit character 0-9, a-f, and A-F

 

[[:xdigit:]]

* Any character of a certain glyph set, such as a, à, á, â, ã, ä, å, A, À, Á, Â, Ã, Ä and Å

 

[[=a=]]

* Can be entered in the Find What box only, not the Change To box.

^ Can be entered in the Change To box, not the Find What box.