Questions tagged [grep-indesign]

InDesign's built-in 'grep' function.

InDesign's built-in grep function.

45 questions
7
votes
2 answers

How to find, and standardize the spelling of chapter and page references (Adobe InDesign)?

I want to find digits followed by "f", "ff", "f." or "ff." to standardize the spelling following given conventions/rules. I already tried some regular expressions, but unfortunately I did not find an universal expression grabbing all of the cases…
typopaul
  • 81
  • 4
3
votes
1 answer

grep uppercase words to lowercase while excluding Roman numerals

I'm trying to write a single regular expression to convert all uppercase words to lowercase while excluding uppercase Roman numerals from being converted. The only way I found was to convert all uppercased words that are followed by a space, comma,…
jeffrbauer
  • 125
  • 1
  • 13
2
votes
1 answer

How to match everything except for specified strings?

Ok so I'm really struggling to figuring this one out. There where other post on here answering this question but non of them worked out for my use case (GREP InDesign). Input: meelebox meelebox meeleboxmeeleduelist meeleboxuser meelebox meelebox…
2
votes
1 answer

Regex select words longer than 4 characters but only one instance if duplicates

I am trying to format text in InDesign using GREP Style. The goal is to select words longer then 4 letters in a paragraph but if the word has been duplicated in a paragraph it should not select more then first instance of this word. This is sample…
koczkodan
  • 21
  • 1
2
votes
1 answer

InDesign Script not working when dialog window is added

I am trying to create a script based on GREPs that replaces fonts in non-latin characters with a compatible font, but when I add it to a dialog window it does not work anymore (it works by itself). I have identified the point where it stops running…
2
votes
4 answers

How to replace only first instance with grep/regex?

I'm trying to design a single regex that produces the two following scenarios: foobar_foobar_190412_foobar_foobar.jpg => 190412 foobar_20190311_2372_foobar.jpg => 20190311 The regex I came up with is close, but I can't figure out how to…
2
votes
1 answer

Regex \A until \r syntax

How could I write "Get everything from beginning of string (\A) until carriage return character (\r)" and leave rest as is in regex? I would like to use this in InDesign's GREP feature to style the first paragraph of a text box (before a carriage…
gmorissette
  • 291
  • 1
  • 3
  • 13
2
votes
1 answer

Controlling where paragraphs start and end on a page, in InDesign

I would like the pages of an .indd document to begin with regular text, no paragraphs (nor in the end), and to end with either italicized text or with 2 lines of regular text if the next page has at least one line regular text also. Could someone…
Mauritz
  • 117
  • 12
1
vote
1 answer

GREP changing function when applying 'change all'

OK, so this is really weird. I'm running this GREP to add space between closing quote marks/apostrophes and footnotes. Find: (~])(~F) Change: ~]~|$2 This works great when I change them one by one, but when I hit the 'change all' button it just…
1
vote
1 answer

Look for a second carriage return using InDesign Grep

I am looking for a grep expression for InDesign. I have the following lines: This is Line 1 This is Line 2 This is Line 3 This is Line 4 This is Line 5 This is Line 6 Line 1 and 2 will be right indent. Line 3 and 4 will be left indent. Line 5 and…
Shahid
  • 65
  • 6
1
vote
1 answer

Is there a way of creating a multiple character lookbehind?

I need a way of finding long quotes which don't preclude long quotes containing an apostrophe s. This is my code: ‘.{250,}(?=[\.’])(?=[,’])(?=[\?’])(?=[!’]) See this regex demo. There are two long quotes (one with a possessive apostrophe s) and one…
1
vote
1 answer

Using GREP to format numbers which are succeeded by specific characters

Hi dear stackoverflow community, I have a small GREP question and would need your help. In my catalog, there are some ordering numbers which need specific formatting. As you can see, the numbers are always bold and they also are colored when they…
si1rin
  • 23
  • 5
1
vote
0 answers

GREP: can you have 2 positive lookahead token/argument pairs in a legal GREP query?

I'm having trouble finding a sequence that works it InDesign to move full stops (US English: periods) before footnote(s) when they trail the superscripted endnote references to a word/phrase. so make thisfoo23,25. into…
wide_eyed_pupil
  • 3,153
  • 7
  • 24
  • 35
1
vote
2 answers

InDesign GREP find between

In InDesign's GREP search I'm trying to get parts of a text field which was filled with a CSV (file using # as delimiter). The reason I want to grep the different parts is to give each a different character style. The Textfield content looks like…
Anatol
  • 1,923
  • 6
  • 26
  • 55
1
vote
1 answer

GREP code for InDesign Search

I have a GREP command: (?<=say).+.".+?" It finds all lines that have say (but doesn't include it), quoted words and characters between it. It would like to make a change only to the quoted words (not the characters in between)…
Mauritz
  • 117
  • 12
1
2 3