Questions tagged [grep]

A Unix command used to search files for the occurrence of a string of characters that matches a specified pattern.

Filter by
Sorted by
Tagged with
1 vote
1 answer
39 views

Setting up a GREP find and proper nouns

I'm trying to set up a GREP which will find the proper nouns in my document and apply a character style to them which I will then use to preclude them from a spellcheck (I'm trying to avoid having to ...
0 votes
2 answers
47 views

Indesign Grep function to break email addresses on @ symbol

I'm trying to fit email addresses in a staff directory and wish to have the emails break on @ in order to have them look more consistent. I'm importing the email addresses via a data merge as well ...
0 votes
3 answers
79 views

How do I use PositiveLookbehind to match multiple strings in GREP styles in Adobe Indesign?

I'm trying to format a keyword(s) that comes after specific string. For example, I want to bold the words, "happy", "sad", and "angry", but only if they are preceded by &...
0 votes
1 answer
53 views

GREP: selecting parts of the paragraphs enclosed by brackets

Please help me select the words within the small brackets, including the brackets themselves so that I can apply formatting to it. Here is a sample text: "This is an apple (red), and that is a ...
0 votes
2 answers
184 views

InDesign GREP code for find words between a full stop (.) and a colon (:)

What is the GREP code for finding all words between a full stop (.) and a colon (:) and then selecting those words and the colon (but not the fullstop)? For example: '. Tone:' or '. Final result:') in ...
0 votes
1 answer
281 views

GREP: Format PART of a paragraph in InDesign

I am trying to format a part of a paragraph (I have the paragraph style) with GREP. It is the caption of some photos, and the phrases are divided by the sign of "|": This is phrase 1 | This ...
0 votes
1 answer
99 views

Set text to white automatically on dark spreads

I'm working on an illustrated book with artwork throughout. Every so often, I have a spread that has a dark background. I've created a Master page with headers and folios set in white but I can't see ...
0 votes
0 answers
64 views

Indesign script to automate order list by last name

Every month I have to order a long list of names alphabetically by last name. Is there a way to do this all in one single script? This is what I am currently doing: Use a GREP to place the last names ...
0 votes
1 answer
232 views

Writing GREP Wildcard Script for Illustrator without prompts

I found a script on here that adds percentage symbols to numbers in illustrator. It works great and I figured out way to auto populate the fields with the needed strings to run the code without having ...
1 vote
4 answers
3k views

InDesign: Using GREP to style URLs, email addresses, phone numbers, social handles, and hashtags

I'm brand new to GREP and its uses in InDesign, and while I'd like to understand it in a more robust way someday, at the moment I'm struggling to find some resources that can explain just the basics ...
0 votes
0 answers
139 views

GREP to select footnote text and make it inline note

Now I am finished with my magazine for sighted people and want to get it ready to Braille for the blind. In the process, I need to change the footnotes to inline notes. Is there a way to use GREP to ...
0 votes
1 answer
111 views

Indesign: Keep multiple paragraphs (of different styles) sets together

Is it possible with a script or GREP styles to keep together multiple sets of paragraphs which can contain 5-6 different paragraph styles though the start and end paragraph styles are always the same –...
0 votes
1 answer
87 views

Remove the round brackets and keep the text?

I have more than 1000 titles with round brackets. All have a paragraph style. I'm trying to keep the title\text but removing the brackets. I managed to find them in the GREP, but I could not find what ...
2 votes
2 answers
451 views

Indesign: GREP lookbehind

I'm trying to automatize giving character styles to the editor given names (not the author names) in literature sources like this one via Find/Change (not GREP styles): Jacobs, G. A., Boero, J. V., ...
2 votes
0 answers
35 views

Adding a title before several paragraphs of a certain paragraph style

In Indesign, I need to insert a fixed title (something like - "law") before each group of paragraphs of a certain paragraph style, and another title right after it (something like - "...
2 votes
1 answer
748 views

InDesign Paragraph Styles, Object Styles & GREP

New to the forum, so apologies if this has possible been covered before. I work in catalogue creation and we've recently transferred over to InDesign I'm trying to recreate our price lozenges in ...
1 vote
1 answer
656 views

InDesign GREP that matches select characters between two strings

I am trying to typeset a dictionary, and at the end of many of the word entries, there are additional references the reader can consult. ...definition here. For further reference, apple; fruit; tree ...
1 vote
2 answers
715 views

GREP Style Capital first letter

Is it possible to create a GREP function that will automatically change the first letter to capital letter in a word? For example: "moonlight" and GREP changes it to "Moonlight". ...
1 vote
1 answer
413 views

Indesign GREP - find lines before a string but exclude string

I am struggling to find some GREP to find lines before a string when I need to exclude the string itself from the selection. In this example, I need to find the 2 lines before "Fox", but ...
4 votes
2 answers
6k views

How to do a wildcard / GREP / regex find-replace in Illustrator?

InDesign can do advanced find - change AKA find - replace using GREP rules AKA regex AKA regular expressions which allows all sorts of wildcard rules and automation. Is there any way to do the same ...
1 vote
1 answer
245 views

InDesign: Regex/GREP works on tester, not in InDesign - issue with OR/| operator?

I have the following sample text: Writing: Gnusto. Editing: Caskly. Circulation: Izyuk. I'm trying to use a GREP regex to select only the job titles and colons (i.e. "Writing:", "...
0 votes
1 answer
352 views

Modify width of all text frames in a document

I have text frames on over 200 pages, Is possible to select all text frames at once and decrease their width through Text Frame Options or any other method, as the edges of text frames are closely ...
0 votes
1 answer
178 views

Append avatar image to each paragraph in chat style book

I have more than 4000 messages, and I want to create a book for these messages in chat style Look at this screenshot, it's just an example Now, everything is ok, but I want to append an avatar image ...
0 votes
0 answers
45 views

Can fonts be displayed as contextual character combinations?

Looking for way to do a handwriting font but where certain letter sequences or patterns display together. Would the method be to put the two or three or four letters together as one, as uncommonly ...
2 votes
1 answer
301 views

Indesign GREP: Negative lookbehind with variable length

I use a complex .txt for the basic findchangebylist-script that is included in inDesign to fix some common typography mistakes. F.e. it changes the hyphen to an en dash and puts a thinspace between 3-...
1 vote
1 answer
513 views

Indesign GREP: Find sentence until first occurence of specific character

the text I work with has marked each words or sentences that should be a marginalia with ##before and after## as in: Edi nos di occus aceaqui blam rerorent eumetur aut eaquid qui ut velibus quid ...
0 votes
2 answers
637 views

How to use GREP to only style a part of the expression?

I like to use GREP in In-Design, the problem is I have a menu like so: HAMBURGER Johnny's Favorite 3.50 I like Johnny's Favorite to be styled differently. The first part, the dish, may contain ...
6 votes
3 answers
5k views

InDesign: grep style to move single i words to next line

I need a Grep style in my paragraph styles in InDesign that makes sure that the letter i cannot stand alone at the end of a line, but will always move to the beginning of the next line. I have a ...
0 votes
1 answer
175 views

Using GREP with Merge in InDesign

I'm doing a data merge for a letter. In the data file there is a column for "title" (Mr., Mrs., Dr. etc.) So I set up my InDesign document with:<<title>> <<first>> &...
0 votes
1 answer
787 views

Adding characters using Grep style in InDesign

2 problems about paragraph style... can grep style do this? Thanks! 1. if number is 10 duplicate four time / result: 10 101010 2. if number is 8 add 3 character like this "*" / result: 8 *...
1 vote
1 answer
902 views

Grep: Search between "beginning of a paragraph" and colon :

I try to apply a style to a string of words that is beginning a paragraph and before a colon. I prepared a first Grep search but it is not working (it is only placing the cursor before the colon ...
1 vote
1 answer
224 views

GREP: Change spaces for tabs in specific conditions

I want to know the way in InDesign with GREPs, if possible, to any paragraph that starts with numbers followed by a period and a space ("00" + [.] + [space]"), and replace the space for ...
2 votes
1 answer
111 views

How do I grep from the match closest to the end?

I have a sequence of titles and description in my text following a pattern similar to Data A: foo; Data B: bar; Data C: baz; Data D: qux I want to bold just the titles, so I wrote the following GREP ...
0 votes
0 answers
559 views

Use GREP in Indesign to replace PAIRS of typographer's (curly) quotation marks

Current format: “This is a quoted speech, which said ‘another quoted speech’ is best.” “However, what about their ‘discussion’s speech’?” Intended format: ‘This is a quoted speech, which said “another ...
-1 votes
2 answers
888 views

GREP for non-breaking space after initials

I'm laying out a bibliography in ID, and I need a way to insert a non-breaking space after initials, so A., B., etc. don't end up at the end of lines. Thanks in advance.
2 votes
1 answer
3k views

Get the start and finish of text in a certain character style in Indesign GREP

I've been fighting with InDesign GREP find/change quite a bit and couldn't find any way to get it to look at the start and the end of a character style. This is necessary if, for example, you want to ...
0 votes
0 answers
46 views

Find a string between 2 static element groups

I want to find all textblocks in InDesign with Grep that are between "Article: " and "— " I already tried to understand what they do here: https://indesignsecrets.com/findbetween-a-...
0 votes
1 answer
1k views

Can I automatically apply a different paragraph style to all paragraphs beginning with a specific character style?

I'm laying out a very long encyclopedia which has lots of entries. The title of each article is inline with the first paragraph (each entry has multiple paragraphs), but does have a character style ...
1 vote
0 answers
301 views

Removing "space" in a data merge if not all names have titles to start with

I found a great reference on here for using Grep to remove a double space in a data merge if some names have a middle initial but others do not. But what do you do if the issue is at the start of the ...
1 vote
1 answer
161 views

How to search for the Nth (2nd, 3rd, etc.) white space in a paragraph?

How to search (via GREP) for the Nth (2nd, 3rd, etc.) white space in a paragraph in Adobe Indesign?
3 votes
0 answers
472 views

Adobe Indesign: How to look for the first line in each paragraph

How can I look for the first line in each paragraph, and add a line break after it?
5 votes
1 answer
3k views

InDesign: how to remove everything between square brackets

I have a script to find all textframes in a document, and do a regular expression to remove (if contains) all text inside square brackets. For example the text frame might contain: "Lorem ipsum ...
0 votes
1 answer
641 views

Setup GREP Style to move numbers to next line InDesign

I'm working on typesetting a book in InDesign that has verses. Each verse starts with a number. The numbers can't be at the end of the line as it is the beginning of the text on the next line. I ...
3 votes
2 answers
600 views

Matching 3 lines following a term using GREP

Here is a sample of the text. NEW! Certificate in Office Operations (3 parts) Office Operations Cyber Security for Managers Embracing Sustainability in the Workplace Intro to 3D Printing ...
1 vote
1 answer
347 views

GREP InDesign, can I move a word to the beginning of a paragraph?

Is there a way to move an entire specific word at the beginning of the sentence it belongs to? Let's say I want words contained within brackets to be repositioned. At the moment I have something like ...
0 votes
1 answer
310 views

How to ignore word from global GREP style?

I asked this question to create a GREP style to make the 2 subscript when I typed H2. I need the GREP to ignore the word H2Van. I thought to amend the GREP to look for a space after the 2 as well ...
1 vote
1 answer
221 views

How to change the font of part of an expression with GREP?

I have the below expression and I want to just change the lowercase i to a different font and leave HMI as is. But I want to do this throughout the document no matter the text size or color.
0 votes
1 answer
166 views

InDesign GREP is not searching [any] styles

I'm troubleshooting one of my book designer's files and I can't seem to wrap my head around what's going on. She reached out to me that her GREP was not picking up characters she was searching for, ...
4 votes
1 answer
236 views

Automatically convert H2 to H₂ when typing in Indesign?

I have to regularly type the word H2 into documents for my job. I always forget to make the 2 subscript I've been watching David Blatner's Indesign secrets and I figured I could use either, commonly ...
2 votes
0 answers
202 views

Does someone know of a script to automatically put specific texts as footnote text?

A little while ago I made this post. Because of that I can automate placing footnote references where they are needed. Now the problem is that the actual footnote texts are just placed randomly in the ...