Skip to main content
Juanxoxoxo
Participant
Feb 11, 2021 4:11 PM UTC
Answered

Negative Lookbehind works in "GREP search" but not in "GREP style"

Hello ! I love Indesign for its extended functionnalities but its quirks may sometimes drive me crazyish. I've looked for answers for a few hours now and I'd better take a rest.

 

I'd like to apply a GREP style to the first paragraph of a text only. I made this formula and it works fine in the GREP search tool : 

(?<!\r)^.+?$

However it does not work properly when I apply this formula to the GREP style "text" box.

 

Did I do something wrong ? Thanks !

This topic is closed to new replies. Start a new post to keep the conversation going.
Colin Flashman
Colin FlashmanCorrect answer
Community Expert
Feb 16, 2021 10:17 AM UTC

GREP searches and GREP styles are similar but not the same. A GREP style works within a passage of type until it gets to the end of a line ($) and then starts again in the next line, but the GREP search is able to look at entire passages without being concerned about end of lines.

If the answer wasn't in my post, perhaps it might be on my blog at colecandoo!

1 reply

Colin Flashman
Community Expert
Colin FlashmanCommunity ExpertCorrect answer
Community Expert
Feb 16, 2021 10:17 AM UTC

GREP searches and GREP styles are similar but not the same. A GREP style works within a passage of type until it gets to the end of a line ($) and then starts again in the next line, but the GREP search is able to look at entire passages without being concerned about end of lines.

Translate
If the answer wasn't in my post, perhaps it might be on my blog at colecandoo!