Skip to main content
Juanxoxoxo
Participant
February 11, 2021
Répondu

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 !

Ce sujet a été fermé aux réponses.
Meilleure réponse par 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 commentaire

Colin Flashman
Community Expert
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!