Highlighted

GREP styles to find and bold names

New Here ,
Aug 28, 2020

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!

Adobe Community Professional
Correct answer by Manan Joshi | Adobe Community Professional

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

Screenshot 2020-08-28 at 2.14.11 PM.png

-Manan

TOPICS
How to, Scripting

Views

80

Likes

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

GREP styles to find and bold names

New Here ,
Aug 28, 2020

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!

Adobe Community Professional
Correct answer by Manan Joshi | Adobe Community Professional

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

Screenshot 2020-08-28 at 2.14.11 PM.png

-Manan

TOPICS
How to, Scripting

Views

81

Likes

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
Aug 28, 2020 0
Participant ,
Aug 28, 2020

Copy link to clipboard

Copied

hi, try this:

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

Likes

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
Reply
Loading...
Aug 28, 2020 0
New Here ,
Aug 28, 2020

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?

Likes

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
Reply
Loading...
Aug 28, 2020 0
Participant ,
Aug 28, 2020

Copy link to clipboard

Copied

sorry, didn't see them )))

new grep:

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

 

Likes

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
Reply
Loading...
Aug 28, 2020 1
Adobe Community Professional ,
Aug 28, 2020

Copy link to clipboard

Copied

Smart indeed, or should I say I over-complicated and over-engineered the solution 🙂

-Manan

Likes

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
Reply
Loading...
Aug 28, 2020 0
Adobe Community Professional ,
Aug 28, 2020

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

Screenshot 2020-08-28 at 2.14.11 PM.png

-Manan

Likes

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
Reply
Loading...
Aug 28, 2020 1
New Here ,
Aug 28, 2020

Copy link to clipboard

Copied

Wow thank you Manan! This one is working 🙂 

Likes

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
Reply
Loading...
Aug 28, 2020 0
FRIdNGE LATEST
Advocate ,
Aug 30, 2020

Copy link to clipboard

Copied

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

 

(^/)  The Jedi

Likes

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
Reply
Loading...
Aug 30, 2020 1