Copy link to clipboard
Copied
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!
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
Copy link to clipboard
Copied
hi, try this:
(?<=\d\.\)\s)\w+\s\w+
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
sorry, didn't see them )))
new grep:
(?<=(\d\.\)\s)|(\d,\s))\w+\s\w+
Copy link to clipboard
Copied
Smart indeed, or should I say I over-complicated and over-engineered the solution 🙂
-Manan
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Wow thank you Manan! This one is working 🙂
Copy link to clipboard
Copied
\u[\w\h-]+(?=,\h\D)
(^/) The Jedi