Compositor · Grep · About · v1.0
Select a search type and configure options to generate grep pattern
\\d |
Finds any number from 0 to 9 |
\\b |
Matches the start or end of a word (not in the middle) |
| |
Means "OR" - matches this pattern OR that pattern |
() |
Groups things together so you can apply rules to the whole group |
[] |
Matches any single character that appears inside these brackets |
\\ |
Makes special characters work as normal text (like finding a period instead of using it as a rule) |
* |
The thing before this can appear zero times or many times |
? |
The thing before this can appear zero times or once |
{n} |
The thing before this must appear exactly n times (e.g., {3} means exactly 3 times) |
{n,m} |
The thing before this must appear between n and m times (e.g., {2,5} means 2, 3, 4, or 5 times) |
^ |
When inside brackets, means "NOT" - matches anything that is NOT in the brackets |
(?i) |
Ignores capital letters (matches "Hello", "hello", and "HELLO" the same way) |
GREP (Global Regular Expression Print) is a powerful pattern-matching system used in Adobe InDesign's paragraph style settings. It allows you to automatically format text based on complex patterns rather than manually selecting and formatting each instance.
In InDesign, GREP styles are applied within paragraph styles to automatically format specific text patterns. This tool generates GREP patterns that you can copy and paste directly into InDesign's GREP Style settings in your paragraph style options.
Format specific words: Automatically style multiple words at once, with options for case sensitivity and whole word matching. Useful for emphasizing key terms or applying consistent formatting.
Format digits: Style numbers of specific lengths, useful for formatting phone numbers, dates, or other numeric patterns with different fonts or colors.
Format punctuation: Style specific punctuation marks or all punctuation, helpful for applying consistent formatting to quotes, dashes, or other marks.
Format enclosed content: Style text between markers like parentheses, brackets, or custom characters, useful for formatting citations, notes, or other enclosed text.
1. Select a search type (words, digits, punctuation, or enclosed content)
2. Configure your search options (case sensitivity, whole word, etc.)
3. Copy the generated pattern
4. In InDesign, open your paragraph style options, go to the "GREP Style" section, click "New GREP Style", paste the pattern in the "Apply Style" field, and set your case sensitivity preference