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
0answers
6 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
1answer
67 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
1answer
48 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
1answer
33 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
1answer
50 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
1answer
46 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
1answer
78 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 ...
1
vote
1answer
102 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
1answer
131 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
2answers
104 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
0answers
125 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
1answer
69 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
2answers
145 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 ...
-1
votes
1answer
94 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
1answer
125 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
1answer
215 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
2answers
57 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
1answer
275 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 ...
0
votes
1answer
60 views

Apply Format to a certain textpattern in In Design

I have an insane list: Roti Flue # 748 ** Wassberg # 748 ** Furtbüel # 741 ** Zimberg # 738 ** Born # 719 ** + 6000 entries Now Id like to apply a text format to ...
4
votes
1answer
245 views

Grep expression for m3 ha−1

I tried to replace m3 ha−1 into m3 ha−1 with no success. What is wrong with my expression? (?i)(?<=\<m)3(?= ha\>)-1
3
votes
1answer
50 views

Assign a tag to text-block if

How can I assign a tag to a textblock if that textblock only if the textblock had a specific value inside (at the very beginning of the block actually. 95% of my used textblocks within my indesign ...
0
votes
1answer
397 views

GREP terms for searching a dash followed by a string of numbers and a paragraph break

I need to find several text-elements that have a structure like — 12345 or — 123456 or — 1234567 in InDesign via GREP - I can't display that in stackoverflow, but each of these terms is ...
0
votes
1answer
356 views

Indesign GREP capture only next line

I'm trying to GREP-match words on a line starting with a specific word: Contact Person Walter Einstein Company ACME Corp Website acme.com Here, I would want to match the first words before the ...
0
votes
1answer
1k views

InDesign: how to find all numbers followed by a period

I have a list which consists of (goes up to 9): 1. 2. 3. And i want to make them: 1. 2. 3. But, they all have a space before the number, I haven't found a regex to find all these occurrences, ...
5
votes
1answer
2k 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 ...
2
votes
1answer
366 views

Punctuation space after number in footnotes

I'm working on a journal in which there is a lot of footnotes. (17 articles, aprox 30 pages each with at least 30 footnotes). I use superscript nested style to make the number of every footnote in ...
0
votes
1answer
533 views

GREP Style to remove tabs & replace with paragraph break

I am wondering if it is possible to create a GREP Style (not search) to auto-format a consistent data set of info. Data example as follows: XXX1X234-101 "UPAS" WOVEN SPTWR JKT OFF WHITE XXX1X234-...
0
votes
3answers
704 views

Use GREP to replace multiple characters

I need to replace a XXXXXX sequence in my document with the same number of underscore characters. I'm using (Y{2,15}) as the find argument, but can´t find out what is the correct code for the replace ...
-1
votes
1answer
50 views

Is there an environment with GREP outside of InDesign?

The GREP find and search integrated in InDesign is very powerful. Is there a similar smart way outside of InDesign?
0
votes
1answer
63 views

Indesign grep replace question

i am looking for GREP help. I have an issue where i need to delete every line that contains [DELETELINE]. So that [DELETELINE] TestText Test [DELETELINE] loremipsum Example [DELETELINE] loremipsum ...
4
votes
2answers
178 views

Underline all initials after a tab

In my Indesign Style (CS6 on Windows 7) I want to apply the style underline to all initials that come after a tab. NASCAR National Association for Stock Car Racing So the initials all get ...
0
votes
1answer
199 views

InDesign GREP: not replacing the search

I'm searching for a tab at every end of a word. Something like \l\t now I want to replace the tab with a space. How can I exchange the tab with a space without changing the word?
1
vote
2answers
2k views

InDesign: how to apply styles to specific words/phrases

Is it possible to change the font style of specific phrases within an .indd document? I have several phrases to update in a giantic wall of text and all I need to do is change the font to a cursive. ...
1
vote
2answers
1k 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
1answer
565 views

InDesign GREP style Bold before tab

I have this GREP style that bolds text before a colon but I would like to do this without a colon. I have done this as a paragraph style to apply bold to list of abbreviations. ^[^:]+ When I have ...
2
votes
1answer
571 views

Find unwanted paragraph marks (GREP, find, replace, script)

I have an InDesign CS6 document with a lot of numbered paragraphs. They begin with a number and end with a paragraph mark. However, there are some paragraphs which have unwanted paragraph marks in the ...
1
vote
1answer
258 views

InDesign: grep to replace space with EN space after full stops between sentences

The title describes the issue. I am using this query ([\l\u])\.\s([\l\u]) and replacing with $1.~>$2 and it works, BUT this also picks up paragraphs returns, probably because of the \s in the first ...
0
votes
1answer
636 views

Indesign grep - last character/letter

Im trying to apply a grep to my paragraph style. this is the text: "s. 02" I want to apply some special formatting for the last character, "2". But it seems i cant target it, can you help?
0
votes
1answer
428 views

GREP style after double line break

I would like to apply a GREP style to all words after a double line break (before the next line break). Basicly highlight all the titles in the document. What would be the code for that?
2
votes
1answer
403 views

inDesign GREP styles

I have a few documents that have legal lines for 4 different countries (Japan, China, Macau, and Arabic) The legal line is composed for the most part of english and then the japanese characters, ...
6
votes
2answers
2k 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 ...
2
votes
1answer
157 views

InDesign: Automatic change character color of running headers if they have background?

I have been looking to solve this problem: I am designing a book with many pages printed with different colors. Is there any way to make the running header change character color depending on weather ...
1
vote
1answer
122 views

Indesign GREP search includes too much

It is driving me crazy and I have no idea what I am doing wrong. In my document I have to autoformat some regular expressions in and including the brackets. An example is here; [DP, 07.04.1911, „...
3
votes
2answers
320 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
1answer
1k views

GREP rule to catch all types of web link / URL

I'm looking to build a robust, reliable GREP rule to catch all web links and URLs that appears in text, covering all possible characters and gotchas like HTTPS, or URLs in brackets like (http://...
2
votes
2answers
691 views

InDesign GREP everything between two consecutive returns and a digit(or)return

Say I have some text in the following format: What I am trying to style, using GREP, is the beginning of every new paragraph (that comes after an empty line), until a digit or return is reached, so ...
1
vote
1answer
2k views

InDesign: how to run multiple find/change queries at once

The pesky ~c in the grep find change is extremely helpful but limited. I want to script multiple find change actions that replace the text found with complex formatted text blocks containing text, ...
2
votes
1answer
496 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 Im trying to recreate our price lozenges in ...
1
vote
1answer
576 views

Using grep to finding long digit series and inserting thin spaces into them

On my page i have a table with over 500 rows, in it one column where all cells contain a different numbers, such as 55123, 666000, 3000 and 1459000 (figures for sums of money). I would need to insert ...
1
vote
1answer
127 views

How to solve a GREP to use on my TOC

I'm really hard to get grep usage.. any tips on how I can achieve a character style using grep for this example (img): Basically the structure is this: (start)paragraph(shift+enter) [characters I ...