• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

GREP to change text after phrase into bold character style

Engaged ,
Jun 07, 2024 Jun 07, 2024

Copy link to clipboard

Copied

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.

TOPICS
Print

Views

272

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Community Expert , Jun 10, 2024 Jun 10, 2024

Did you try to use a simple nested style?

Capture d’écran 2024-06-10 à 10.28.19.png

Votes

Translate

Translate
Guide , Jun 10, 2024 Jun 10, 2024

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

 

\h~a\h\K.+

 

(^/)

Votes

Translate

Translate
New Here ,
Jun 07, 2024 Jun 07, 2024

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jun 09, 2024 Jun 09, 2024

Copy link to clipboard

Copied

Grep Style:

 

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

"bold" char style

 

(^/)  The Jedi

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jun 10, 2024 Jun 10, 2024

Copy link to clipboard

Copied

Thank you .... sorry this doesn't work, all text is still regular weight.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jun 10, 2024 Jun 10, 2024

Copy link to clipboard

Copied

Thanks, this GREP doesn't seem to work, my paragraph is still regular text. You're right there is a space either side of the anchored object which in this case is an outlined arrow glyph.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jun 10, 2024 Jun 10, 2024

Copy link to clipboard

Copied

Could you post an indd test file?

 

(^/)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jun 10, 2024 Jun 10, 2024

Copy link to clipboard

Copied

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

 

\h~a\h\K.+

 

(^/)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jun 10, 2024 Jun 10, 2024

Copy link to clipboard

Copied

Perfect - this one works. Much appreciated!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 10, 2024 Jun 10, 2024

Copy link to clipboard

Copied

Did you try to use a simple nested style?

Capture d’écran 2024-06-10 à 10.28.19.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jun 10, 2024 Jun 10, 2024

Copy link to clipboard

Copied

LATEST

Thanks - perfect.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines