GREP for applying character style to final sentence

Explorer ,
May 20, 2021 May 20, 2021

Copy link to clipboard

Copied

Hi there. I'm looking for a GREP that will change the text immediately after specific words (or a specific character style) into a new character style.

In my example below 'Specifications:' is already a character style (bold italics). I'd simply like the sentence that follows it to be in the a different character style (italics). 

Although the word 'Specifications:' might differ the format will always be the same, so it will always be the final sentence (or line of text beginning with a capital and ending in a full stop) immediately after the bold italic word that I would like in italics.

 

Harcia vitio eum ipsum facculla ium, nobitatatur sitam eictetus eatus, siminvellit la is dipsandis. Specifications: Ut reperibus, sum et officii ssitestia simpore pereptaque nobisqui officid.

 

Many thanks!

TOPICS
How to, Type

Views

137

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
community guidelines
New Here ,
May 20, 2021 May 20, 2021

Copy link to clipboard

Copied

Find:  ":\h\K.+?\r"

Change: "Character Style"

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
community guidelines
Explorer ,
May 21, 2021 May 21, 2021

Copy link to clipboard

Copied

Thanks... not having much joy with that one, is it a find/change query or a GREP I can insert into the style? I tried it both ways without success...

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
community guidelines
Advisor ,
May 21, 2021 May 21, 2021

Copy link to clipboard

Copied

LATEST

Simplistically:

 

(\b(Pizzas?|Hamburgers?|Cakes?):\h)(.(?!(?1)))+\.$

 

(^/)  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
community guidelines