Skip to main content
Participant
June 13, 2023
Answered

InDesign GREP help

  • June 13, 2023
  • 3 replies
  • 300 views

Hi all, 

 

I need to create a GREP that allows me to set a specific charater style to a title that is in between specific words..eg: ETA. 2023. Title goes here and can contain commas/en and em dashes/semi colons. London.

 

Help?

 

Oh, and if you have resources for dummies about the subject, please point me in the right direction!

 

Thanks in advance.

 

J.

This topic has been closed for replies.
Correct answer Peter Kahrel

Find what: ETA\. 2023\. \K.+?(?= London\.)

Change to: <Leave empty>

Change format: your character style.

 

Source for dummies: https://creativepro.com/now-available-grep-in-indesign-3rd-edition/

3 replies

Peter Kahrel
Community Expert
Community Expert
June 13, 2023

Can I insert this into a paragraph style, into GREP style?

 

Yes, you can.

Peter Kahrel
Community Expert
Community Expert
June 13, 2023

You can try and generalise the Grep to an extent by formulating it as 'Any text bewteen a year followed by a period and a town name. A town name is an initial-capped word at the end of the paragraph:

20\d\d\. \K.+?(?=\b\u\l+?\.$)

 

Peter Kahrel
Community Expert
Peter KahrelCommunity ExpertCorrect answer
Community Expert
June 13, 2023

Find what: ETA\. 2023\. \K.+?(?= London\.)

Change to: <Leave empty>

Change format: your character style.

 

Source for dummies: https://creativepro.com/now-available-grep-in-indesign-3rd-edition/

Participant
June 13, 2023

Can I insert this into a paragraph style, into GREP style?