GREP code dictionary
back-reference (up to \9)
\1
beginning of story
\A
word boundary
\b
digit
\d
non-digit
\D
horizontal space
\h
not horizontal space
\H
lookbehind
\K
(lowercase L) lower-case letter
\l
non-lower-case letter
\L
forced line break
\n
Unicode name
\N{. . .}
negated unicode class
\P{. . .}
unicode class
\p{. . .}
end of paragraph
\r
non-whitespace character
\S
whitespace character
\s
tab character
\t
non-upper-case letter
\U
upper-case letter
\u
vertical space
\v
not vertical space
\V
non-word character
\W
word character
\w
two- or four-digit hexadecimal code
\x{. . .}
end of story
\z
end of story
\Z
backslash character
\\
open bracket character
\[
close bracket character
\]
open brace character
\{
close brace character
\}
open parenthesis character
\(
close parenthesis character
\)
beginning of word
\<
end of word
\>
copyright symbol
~2
third space
~3
quarter space
~4
section symbol
~6
paragraph symbol
~7
bullet character
~8
anchored-object marker
~a
carriage return (=\r)
~b
trademark symbol
~d
variable: output date
~D
ellipsis
~e
even-page break
~E
flush space
~f
footnote marker
~F
end nested style here
~h
variable: chapter number
~H
indent to here
~i
(capital I) index marker
~I
non-joiner
~j
variable: metadata caption
~J
discretionary line break
~k
odd-page break
~L
(lowercase L) variable: file name
~l
column break
~M
em-space
~m
current page number
~N
variable: creation date
~O
variable: modifiation date
~o
page break
~P
frame break
~R
registered symbol
~r
non-breaking
~S
non-breaking (fixed space)
~s
variable: last page number
~T
variable: custom text
~u
any variable
~v
previous page number
~V
next page number
~X
section marker
~x
right-indent tab
~y
variable: running header (paragraph style)
~Y
variable: running header (character style)
~Z
any page number
~#
straight double quotation mark
~”
straight single quotation mark
~’
discretionary hyphen
~-
non-breaking hyphen
~~
punctuation space
~.
figure space
~/
sixth space
~%
hair space
~|
straight left quotation mark
~[
straight right quotation mark
~]
double left quotation mark
~{
double right quotation mark
~}
thin space
~<
en-space
~>
em-dash
~_
en-dash
~=