Skip to main content
Spenno
Inspiring
June 7, 2024
Answered

GREP to change text after phrase into bold character style

  • June 7, 2024
  • 2 replies
  • 1424 views

Good afternoon InDesign wizards. I'm not great with GREP but have been lucky enough to find a few corkers on here that have helped me considerably in my catalogue automation!

Would anyone be able to help with this one - I have a paragraph style and would like a GREP that turns everything that follows a particular phrase into my bold character style, until the end of the paragraph?

The phrase in question is a space followed by a glyph I use (arrow) then another space. According to my Find and Replace window it's ' ~a '. Many thanks folks.

This topic has been closed for replies.
Correct answer FRIdNGE

Could you post an indd test file?

 

(^/)


We suppose the space-anchoring-space is at the beginning of the para. If not, this will be relevant:

 

\h~a\h\K.+

 

(^/)

2 replies

jmlevy
Community Expert
Community Expert
June 10, 2024

Did you try to use a simple nested style?

Spenno
SpennoAuthor
Inspiring
June 10, 2024

Thanks - perfect.

Participant
June 7, 2024

In InDesign grep the '~a' sign represents an anchored object so your glyph may be an imported image.

For this, I would use the expression '^ ~a \K.+' as a search in the Grep style window in the paragraph style and apply your Bold character Style.

FRIdNGE
June 9, 2024

Grep Style:

 

(?s)^\h~a\h\K.+

"bold" char style

 

(^/)  The Jedi