Skip to main content
SuzzyFlamingo
Inspiring
September 7, 2025
Answered

Help w/grep

  • September 7, 2025
  • 1 reply
  • 163 views

Hi friends!

I need to format, within a par style ANY TEXT STRING that has before it - colon and space, and after it a period. So this would be -

 

Yesterday it was: very hot outside. And we stayed inside

So the words "very hot outside." (Including the period but to the colon) get formatted with their own char style.

 

Little by little I will hopefully understand how to do this ...

Thanks

SF

Correct answer Manan Joshi

Yes that makes sense. If the operation that you want to do is apply style on the found string then grep style would work fine.

-Manan

1 reply

Community Expert
September 7, 2025

Use the following grep in find what

(?<=:) [^.\r]+\.

And in the change format select the character style you want to apply

-Manan

-Manan
SuzzyFlamingo
Inspiring
September 7, 2025

Thank you for your attention and reply!

Excuse my ignorance, but can I use this as a nested grep style within a paragraph style to automatically format that string? I mean it is all over my paragraphs, and i would like it to happen in real time.?

edit:

I tried and it worked. So I guess we now know that any grep working in find will also work in a grepped style, right?

 

Manan JoshiCommunity ExpertCorrect answer
Community Expert
September 7, 2025

Yes that makes sense. If the operation that you want to do is apply style on the found string then grep style would work fine.

-Manan

-Manan