Skip to main content
Participant
August 28, 2020
Answered

GREP styles to find and bold names

  • August 28, 2020
  • 2 replies
  • 738 views

I'm a newbie using InDesign GREP styles and I'm trying to find out a way to bold names on rally competition results. It's not an option to bold all the names manually because it would take ages. Is there a way to do it with GREP Styles? Here's an imaginary exampe of the text on the results, notice that the whole list is on the same paragraph to save space.

1.) Harry Stones, Rallyclub Newcastle, 47.14,8, Ben Williams, Mercedes Benz 190 E 2.3-16 (W201) 2.) Tom Wood, NameOfTheClub, 41.24,3, David Cave, Skoda Fabia R5 3.) Mike Evans, London Motorsport, 31.08,7, Philip Fox, Opel Astra f Gsi

 

Thanks!

This topic has been closed for replies.
Correct answer Manan Joshi

I think you need two grep styles to be added, as follows

\d+\.\)\s+\K(.*?),
\d+\.\) +.*?,(.*?,){3} +\K([^,]+)

This works for your example, see screenshot

-Manan

2 replies

Manan JoshiCommunity ExpertCorrect answer
Community Expert
August 28, 2020

I think you need two grep styles to be added, as follows

\d+\.\)\s+\K(.*?),
\d+\.\) +.*?,(.*?,){3} +\K([^,]+)

This works for your example, see screenshot

-Manan

-Manan
Participant
August 28, 2020

Wow thank you Manan! This one is working 🙂 

FRIdNGE
August 30, 2020

\u[\w\h-]+(?=,\h\D)

 

(^/)  The Jedi

SychevKA
Inspiring
August 28, 2020

hi, try this:

(?<=\d\.\)\s)\w+\s\w+

Participant
August 28, 2020

Thanks! This helped me to bold names of the drivers (in the example Harry Stones, Tom Wood and Mike Evans) but it doesn't bold the codrivers (in the example Ben Williams, David Cave and Philip Fox). Is there a way to bold these as well?

SychevKA
Inspiring
August 28, 2020

sorry, didn't see them )))

new grep:

(?<=(\d\.\)\s)|(\d,\s))\w+\s\w+