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.
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!
Copy link to clipboard
Copied
Use a GREP style instead.
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?
Copy link to clipboard
Copied
^.+?(?=Risk)
Copy link to clipboard
Copied
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!