Skip to main content
Participant
June 12, 2023
Answered

Applying style to text between double tabs in InDesign using GREP

  • June 12, 2023
  • 2 replies
  • 309 views

Hi!

I have a document with a very loooong list of titles followed by authors, and I am looking for a fast way to apply a certain character style to all Author names, which are currently in between double tabs (which I then plan to remove through find/replace). Any useful script to do this would be extremely helpful!

Many thanks
Best
Marina


This topic has been closed for replies.
Correct answer Eugene Tyson

Use Nested Styles instead.

 

https://helpx.adobe.com/indesign/using/drop-caps-nested-styles.html#:~:text=nested%20styles.)-,Create%20nested%20styles,-You%20can%20specify

 

You can choose

'none' 'through' to 2 Tabs

'<char style>' 'up to' 2 Tabs

 

 

2 replies

Eugene TysonCommunity ExpertCorrect answer
Community Expert
June 13, 2023

Use Nested Styles instead.

 

https://helpx.adobe.com/indesign/using/drop-caps-nested-styles.html#:~:text=nested%20styles.)-,Create%20nested%20styles,-You%20can%20specify

 

You can choose

'none' 'through' to 2 Tabs

'<char style>' 'up to' 2 Tabs

 

 

dougl77390883
Participating Frequently
June 12, 2023

Hi,

 

You could try using Find and Replace with GREP like so:

 

(\t\t)(.*?)(\t\t)

 

Then select Change Format and Change all

Peter Spier
Community Expert
Community Expert
June 12, 2023

I think it might be better to use (?<=\t\t).+?(?!\t\t) so the character style is applied only to the text between the tabs, not to the tabs as well.