Questions tagged [grep]
A Unix command used to search files for the occurrence of a string of characters that matches a specified pattern.
99
questions
0
votes
0
answers
18
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
69
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
2
answers
60
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
59
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
69
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 ...
0
votes
2
answers
39
views
How do I use PositiveLookbehind to match multiple strings in GREP styles?
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
0
answers
117
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 ...
2
votes
0
answers
34
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 - "...
1
vote
1
answer
415
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
557
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
320
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 ...
0
votes
1
answer
213
views
GREP: Format PART of a paragrah 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 ...
1
vote
1
answer
206
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
288
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
154
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
284
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-...
0
votes
2
answers
553
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 ...
1
vote
1
answer
468
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
1
answer
151
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
219
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 ...
0
votes
1
answer
718
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
818
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 ...
2
votes
2
answers
411
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., ...
1
vote
1
answer
198
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
101
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
511
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
819
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.
0
votes
0
answers
45
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
947
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
287
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
142
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
440
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?
0
votes
1
answer
604
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 ...
1
vote
1
answer
336
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
281
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
179
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
158
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
203
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
1
answer
420
views
InDesign, Grep - what is the base syntax of InDesign grep
There are many regex syntax, one different from the other: .Net regex, Java regex, PHP/PCRE regex, Python regex. etc.
Some sites for checking & testing regex expressions are just great - like ...
1
vote
1
answer
431
views
InDesign FindChangeByList Search for Text in a Style
Simple question:
What is the Javascript syntax for adding a Paragraph or Character Style to a search in the FindChangeByList.txt file?
As in: grep {findWhat:"Anything", findStyle"Bolder"}
Thank you....
0
votes
2
answers
673
views
InDesign CC GREP Help. Adding spaces around "+" (plus) symbol
Should be simple but it's not.
This GREP expression works in the FIND/CHANGE PANEL in InDesign CC:
However, when I plug it into a FindChangeList.txt, it doesn't work:
I know for a fact that the ...
2
votes
0
answers
195
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 ...
3
votes
1
answer
205
views
GREP style for three digit code NOT followed by specific characters
I'm trying to set up a GREP style that will style a 3 digit code (example 789) but not apply that style when the code is followed by the characters ct.
So the style would apply to the 100 in "100 ...
1
vote
2
answers
496
views
InDesign GREP, Single Character Underlining
I'm new to the concept of using GREP. I work on documents which contain Australian Indigenous terms which contain special characters, for example, Ayers Rock's Indigenous name is Uluru, whereby the r ...
0
votes
1
answer
268
views
Apply Find/Change only within all paragraphs of certain style
Would like to know if there is a way to replace "normal returns" with "hard returns" as I would in Find/Change, but only affecting all paragraphs of a certain style (I don't want this change made to ...
1
vote
1
answer
561
views
Indesign: add line break after first two words in batch
I am looking to insert a line break after two words for a large document on multiple paragraphs. I am using find/change to search for ^w which inserts a line break after one space, what would be the ...
2
votes
1
answer
741
views
Targeting every second tab using Grep and then changing it to nothing
I imported this tabbed text from Microsoft Word into Indesign as shown in the attachment.
I am attempting to replace every second tab in this text into no character ie any tab number that is ...
0
votes
2
answers
63
views
In Indesign, is it possible to put a title into greps of a paragraph style?
In Indesign, is it possible to put a name or description into greps of a paragraph style to remember instantly what was the purpose of it?
I mean any query ever designed for it, or something like ...
0
votes
1
answer
804
views
text on different lines with different styles, colours, leading and baseline shift, can it be turned into a paragraph style?
I have a text box with text on different lines with different styles, colors, leading and baseline shift. Is it possible to create this as a "standard/ master version", so that whenever any ...