Professional Documents
Culture Documents
Quick Guide To GREP Codes in Adobe InDesign-new
Quick Guide To GREP Codes in Adobe InDesign-new
Quick Guide To GREP Codes in Adobe InDesign-new
\s \p{s}
[[:space:]]
Whitespaces and Forced Line Break Whitespaces and Tab (Horizontal Whitespaces)
Break Characters (End of Paragraph) Unicode Markers (Special Middle East Characters)
\r \p{cf}
\x{0D}
dafirphoto@yahoo.com
Whitespace Characters With its actual width
in 24 pt font size Tab Characters
GREP codes of White paces in InDesign Normal Space (Word Space) Tab
\x{0020}, \x{20} \t \x{0009}, \x{09}
Em Space Right Indent Tab
~m \x{2003} ~y \x{0008}, \x{08}
En Space
Other or Special Tab Characters
~> \x{2002}
Indent to Here
Nonbreaking Space
~i \x{0007}, \x{07}
~S \x{00A0}, \x{A0}
End Nested Style Here
Nonbreaking Space
(fixed width) ~h \x{0003}, \x{03}
~s \x{202F} Non-joiner
Hair Space ~j \x{200C}
~| \x{200A}
Break Paragraph Characters
Sixth Space
Forced Line Break
~% \x{2006}
\n \x{000A}, \x{0A}
Thin Space
Standard Carriage Return
~< \x{2009}
~b
Quarter Space
~4 \x{2005} Break Characters
Third Space Column Break ~M
~3 \x{2004}
Frame Break ~R
Punctuation Space
Page Break ~P
~. \x{2008}
Figure Space
Odd Page Break ~L
~/ \x{2007} Even Page Break ~E
Flush Space Discretionary Line Break
~f \x{2001} ~k \x{200B}
(1) \C
1
Some Characters (Basic Latin)
Word слово λέξη sözcük َك ِل َمـةٌ ִמ ָלה
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
ÀÁÂÃÄÅàáâãäåÆæ
0123456789 0123456789 0123456789 ½ Ⅷⅷ
{[()]} , ; : . ? ! / \ ־- ‑ _ — – … • * & % # @ ، ؟ ؛
«»‹›’"'״׳
`~=+×|<>↔$^¶§©®™♫ \p{ASCII}
(1) [\x{0000}-\x{007F}]
1
Only Characters whose codes greater than 255
Word слово λέξη sözcük َك ِل َمـةٌ ִמ ָלה
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
ÀÁÂÃÄÅàáâãäåÆæ
0123456789 0123456789 0123456789 ½ Ⅷⅷ
{[()]} , ; : . ? ! / \ ־- ‑ _ — – … • * & % # @ ، ؟ ؛
«»‹›’"'״׳
`~=+×|<>↔$^¶§©®™♫
(1) [[:unicode:]]
1
All Except footnote
Word слово λέξη sözcük َك ِل َمـةٌ ִמ ָלה
ABCDEFGHIJKLMNOPQRSTUVWXYZ
GREP codes to find group of Characters in InDesign abcdefghijklmnopqrstuvwxyz
ÀÁÂÃÄÅàáâãäåÆæ
0123456789 0123456789 0123456789 ½ Ⅷⅷ
{[()]} , ; : . ? ! / \ « ־- ‑ _ — – … • * & % # @ ، ؟ ؛
= ~ ` » ‹ › ’ " ' ״ ׳+ × | < > ↔ $ ^ ¶ § © ® ™ ♫(1) [[:graph:]]
1
All Letters, Digits, and Underscore
Word слово λέξη sözcük َك ِل َمـةٌ ִמ ָלה
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
ÀÁÂÃÄÅàáâãäåÆæ
0123456789 0123456789 0123456789 ½ Ⅷⅷ \w
{[()]} , ; : . ? ! / \ « ־- ‑ _ — – … • * & % # @ ، ؟ ؛
= ~ ` » ‹ › ’ " ' ״ ׳+ × | < > ↔ $ ^ ¶ § © ® ™ ♫ (1) [[:word:]]
1
All Letters and Digits, except Underscore
Word слово λέξη sözcük َك ِل َمـةٌ ִמ ָלה
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
ÀÁÂÃÄÅàáâãäåÆæ
0123456789 0123456789 0123456789 ½ Ⅷⅷ
{[()]} , ; : . ? ! / \ « ־- ‑ _ — – … • * & % # @ ، ؟ ؛ [[:alnum:]]
= ~ ` » ‹ › ’ " ' ״ ׳+ × | < > ↔ $ ^ ¶ § © ® ™ ♫ (1) \p{alnum}
1
All Letters
Word слово λέξη sözcük َك ِل َمـةٌ ִמ ָלה
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
ÀÁÂÃÄÅàáâãäåÆæ
0123456789 0123456789 0123456789 ½ Ⅷⅷ
{[()]} , ; : . ? ! / \ « ־- ‑ _ — – … • * & % # @ ، ؟ ؛ [[:alpha:]]
= ~ ` » ‹ › ’ " ' ״ ׳+ × | < > ↔ $ ^ ¶ § © ® ™ ♫ (1) \p{l*}
1
Uppercase Letters
Word слово λέξη sözcük َك ِل َمـةٌ ִמ ָלה
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
ÀÁÂÃÄÅàáâãäåÆæ \u
0123456789 0123456789 0123456789 ½ Ⅷⅷ
{[()]} , ; : . ? ! / \ « ־- ‑ _ — – … • * & % # @ ، ؟ ؛ [[:upper:]]
= ~ ` » ‹ › ’ " ' ״ ׳+ × | < > ↔ $ ^ ¶ § © ® ™ ♫ (1)
\p{lu}
1
Lowercase Letters
Word слово λέξη sözcük َك ِل َمـةٌ ִמ ָלה
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
ÀÁÂÃÄÅàáâãäåÆæ \l
0123456789 0123456789 0123456789 ½ Ⅷⅷ
{[()]} , ; : . ? ! / \ « ־- ‑ _ — – … • * & % # @ ، ؟ ؛ [[:lower:]]
= ~ ` » ‹ › ’ " ' ״ ׳+ × | < > ↔ $ ^ ¶ § © ® ™ ♫ (1)
\p{ll}, \p{l}
1
Digits & Decimals
Word слово λέξη sözcük َك ِل َمـةٌ ִמ ָלה
GREP codes to find group of Numeral in InDesign ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
ÀÁÂÃÄÅàáâãäåÆæ
0123456789 0123456789 0123456789
⅓⅔⅕⅖⅗⅘⅙⅚⅛⅜⅝⅞⅟
ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫ
ⅰⅱⅲⅳⅴⅵⅶⅷⅸⅹⅺⅻ \p{n*}
{[()]} , ; : . ? ! / \ ־- ‑ _ — – … • * & % # @، ؟ ؛
Digits
Word слово λέξη sözcük َك ِل َمـةٌ ִמ ָלה
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
ÀÁÂÃÄÅàáâãäåÆæ \d
0123456789 0123456789 0123456789
⅓⅔⅕⅖⅗⅘⅙⅚⅛⅜⅝⅞⅟ [0-9]
ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫ
ⅰⅱⅲⅳⅴⅵⅶⅷⅸⅹⅺⅻ
[[:digit:]]
{[()]} , ; : . ? ! / \ ־- ‑ _ — – … • * & % # @، ؟ ؛ \p{nd}
Decimals
Word слово λέξη sözcük َك ِل َمـةٌ ִמ ָלה
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
ÀÁÂÃÄÅàáâãäåÆæ
0123456789 0123456789 0123456789
⅓⅔⅕⅖⅗⅘⅙⅚⅛⅜⅝⅞⅟
ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫ
ⅰⅱⅲⅳⅴⅵⅶⅷⅸⅹⅺⅻ \p{no}
{[()]} , ; : . ? ! / \ ־- ‑ _ — – … • * & % # @، ؟ ؛
Number Forms
Word слово λέξη sözcük َك ِل َمـةٌ ִמ ָלה
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
ÀÁÂÃÄÅàáâãäåÆæ
0123456789 0123456789 0123456789
⅓⅔⅕⅖⅗⅘⅙⅚⅛⅜⅝⅞⅟
ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫ \p{nl}
ⅰⅱⅲⅳⅴⅵⅶⅷⅸⅹⅺⅻ
{[()]} , ; : . ? ! / \ ־- ‑ _ — – … • * & % # @، ؟ ؛
[\x{2150}-\x{218F}]
GREP codes of Characters in InDesign { \{ [{] \x{007B}, \x{7B} } \} [}] \x{007D}, \x{7D}
« ~} \x{201D} » ~{ \x{201C}
‹ ~[ \x{2039} › ~] \x{203A}
Comma Semicolon
Colon Ellipsis
Slash Backslash
Grammar marks
(Hebrew, Arabic, & Persian) Arabic Question Mark
Punctuations
CJK Symbols and Punctuation [\x{3000}-\x{303F}]
General Punctuation [\x{2000}-\x{206F}]
Supplemental Punctuation [\x{2E00}-\x{2E7F}]
…\> End of Word: To find word that ends with your code
\<…\> Beginning and End of word: To find the exact code between
\b…\b Beginning and End of word: To find the exact code between
\B…\B Not exact word: To find your code in anywhere except start or end word
…\Z, …\z End of story: Find story that ends with your code
? Zero or One Time: Does not exist or exists only one (0, 1)
ab? a ab abb abbb abbbbbb Find (a) followed one (b) or not
* Zero or More Times: Does not exist or exists one or more (0, 1+)
ab* a ab abb abbb abbbbbb Find (a) followed one (b) and more or not
ab+ a ab abb abbb abbbbbb Find (a) followed one (b) or more
ab*? a ab abb abbb abbbbbb Find only (a) even if (b) exists
+? One or More Times (Shortest Match): To find exactly match and leave other (1)
ab+? a ab abb abbb abbbbbb Find only (ab) even if (b) repeated
{n} Exact Number: To find the exact number of times (1)
GREP expressions for search in InDesign ab{1} a ab abb abbb abbbbbb Find (a) followed (b), even if (b) repeated
{n,} Least and More Times: To find at least number to more times (1, 1+)
ab{2,} a ab abb abbb abbbbbb Find (a) followed two (b) and more
a(b)\1 a ab abb abbb abbbbbb Find (a) followed one repeated (b)
a(b)\1+ a ab abb abbb abbbbbb Find (a) followed all repeated (b)
…\K…(?=…)
Same as (CS6 and abov)
(?>…) Atomic Group: Matches the longest possible substring in the group and doesn't
allow later backtracking to reevaluate the group.
Codes of Change to
~c Clipboard Contents, Formatted: To paste (what you copied on a clipboard) in text with
its format
Find What: ^~8 • List one
Change To: ~c List one