Skip to main content
Juanxoxoxo
Participant
February 11, 2021
Answered

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

  • February 11, 2021
  • 1 reply
  • 495 views

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 has been closed for replies.
Correct answer Colin Flashman

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.

1 reply

Colin Flashman
Community Expert
Colin FlashmanCommunity ExpertCorrect answer
Community Expert
February 16, 2021

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!