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

GREP for applying character style to final sentence

Engaged ,
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

248

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
Participant ,
May 20, 2021 May 20, 2021

Copy link to clipboard

Copied

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

Change: "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
Engaged ,
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...

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

Copy link to clipboard

Copied

LATEST

Simplistically:

 

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

 

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