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

Using a word in nested styles

Community Beginner ,
May 09, 2024 May 09, 2024

Copy link to clipboard

Copied

I am applying a nested style to text that has a lead-in. The nested style would apply a bold character style for the first sentence, or up to the first period. The issue is that some lead-ins contain "U.S." so the nested style will stop at the period between "U" and "S".

 

The one common word in each lead-in is that the sentence always ends with "Risk.". I would like to change the nested style rule to end with that but it doesn't work.

 

Does anyone know of another solution?

 

Thanks in advance.

TOPICS
How to , Type

Views

77

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

correct answers 1 Correct answer

Community Beginner , May 09, 2024 May 09, 2024

I didn't describe what I needed properly. I wrote that I wanted to look for anything up to when I actually meant through. I took what Peter sent and modified it a bit to

^.+?(?<=Risk)

 This got the results I was looking for.

 

Thank you Peter and Willi for your help and advice!

Votes

Translate

Translate
Community Expert ,
May 09, 2024 May 09, 2024

Copy link to clipboard

Copied

Use a GREP style instead.

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
Community Beginner ,
May 09, 2024 May 09, 2024

Copy link to clipboard

Copied

Is there a GREP that will look for anything up to "Risk." and apply a character style? Or am I looking at this the wrong way?

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
Community Expert ,
May 09, 2024 May 09, 2024

Copy link to clipboard

Copied

^.+?(?=Risk)

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
Community Beginner ,
May 09, 2024 May 09, 2024

Copy link to clipboard

Copied

LATEST

I didn't describe what I needed properly. I wrote that I wanted to look for anything up to when I actually meant through. I took what Peter sent and modified it a bit to

^.+?(?<=Risk)

 This got the results I was looking for.

 

Thank you Peter and Willi for your help and advice!

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