Questions tagged [grep-indesign]

InDesign's built-in 'grep' function.

InDesign's built-in grep function.

45 questions
1
vote
2 answers

How to store $2 value to variable in InDesign GREP find / change using javascript

I'm writing InDesign javascript, that do GREP find / change - actually for now I need only find some text and save to my script variable what grep found in $2 value - everything else for my script I know how to do - so all I need for now is to find…
Oleh Melnyk
  • 337
  • 5
  • 11
1
vote
1 answer

GREP in Adobe InDesign for function name

I'm looking for a grep for JavaScript function names including parenthesis. Example: myfunction() I need it to ignore jQuery events like .on(), .click(), .width() as well. So basically "get word before parenthesis and parenthesis but not if there is…
0
votes
0 answers

Is there a way of formulating a GREP find and replace so that the first sub-expression is not changed but the second sub-expression is?

I want to apply a paragraph style to the first character after a page break (second sub-expression). But I don't want this style to be applied to the page break (first sub-expression). Is there any way of doing this? I tried this: Find:…
0
votes
0 answers

How to bound images on page and having an individual text per image in a JSON file in InDesign+ title per page

Here is my code to build a 20 page document with prime numbered grids and random image positions and formats but they go out of the page, and it would be good to get the images to snap to the grid and have an individual comment/text per image. I…
ambaamba
  • 71
  • 6
0
votes
1 answer

Formatting product numbers in a uniform way

I am currently trying to format some articles in a catalog. I am doing this using GREP in a paragraph style that's applied to the articles. My problem is that the numbers have so many special situations. The basic number is PR-1234 (4-8 characters…
si1rin
  • 23
  • 5
0
votes
2 answers

Exclude multiple patterns with ^

I'm trying to search for strings of 250+ characters beginning with an opening apostrophe but not including a full stop and closing apostrophe; comma and closing apostrophe; exclamation point and closing apostrophe; or question mark and closing…
0
votes
2 answers

GREP to find a sequence of characters without a closing apostrophe

I'm trying to find long quotes in the text that I'm editing so that I can apply a different style to them. I've tried this GREP: ~[.{230}(?!.~]) What I need is for the GREP to find any 230 characters preceded by a left/opening quote mark, not…
0
votes
1 answer

Format PART of a specific word in InDesign

There's a unique, made-up word in a book I am editing. I need to italicize the first three letters of this word every time it occurs. So far I have determined that GREP styles are my best shot at automatically formatting this word, but I have not…
0
votes
1 answer

InDesign Endnote Automation

I'm using this simple script to grab text wrapped in [ENDNOTE][/ENDNOTE] tags and make them into actual InDesign endnotes. The problem I'm having is that only the first 4 characters are being placed between the endnote markers (see screenshot…
Circle B
  • 1,616
  • 3
  • 26
  • 45
0
votes
1 answer

inDesign extract special objects form plain text paragraph

i'm trying to find a way to get only the plain text contained in a paragraph, and exclude the special objects contained in the para. This is an example of my case. I have this paragraph, obtained with app.activeDocument. : paragraph , which contains…
0
votes
1 answer

Indesign find text not in whole document

I'm searching for a way to find the text of a specific paragraph style in an InDesign document but without searching the whole document, instead, I want to search only inside a text frame or other object. The only way I found for now is using…
0
votes
1 answer

Adobe InDesign Find/Change script

in order to make my work with InDesign easier, I've generated this Find/Change script using chainGREP. This is part of code only: // Query [[Query GREP1]] -- If you delete this comment you break the update function try { …
sp33dy
  • 3
  • 3
0
votes
2 answers

GREP for end of text symbol

I need to go through and join hundreds of separate text frames into a unified text thread. The problem is that when I link the frames the style of the first paragraph of the frame I'm linking to ofter changes to the style of the last paragraph in…
0
votes
2 answers

Grep: How to only find the first price mentioned in a line of text

I have a bunch of variable text in Adobe Indesign and I'd like the first mentioned price in each line of text to have another color. I am completely new to regular expressions and got stuck. I used the following grep to find the price but it find's…
Mackie
  • 3
  • 1
0
votes
2 answers

GREP Styles in Adobe InDesign

I posted a question a few days ago about importing data to an InDesign file from a MySQL database using XML. I have looked into it and thanks to some help received from other sources think the project should be fairly straightforward. Essentially,…
BenM
  • 52,573
  • 26
  • 113
  • 168