Daniel James Smith
Daniel James Smith

Reputation: 65

Is there a way of formulating a GREP find and replace so that the first sub-expression is not changed but the second sub-expression is?

I want to apply a paragraph style to the first character after a page break (second sub-expression). But I don't want this style to be applied to the page break (first sub-expression). Is there any way of doing this?

I tried this:

Find: (~P)(.)

Change: $1~h$2 (change format to first para style)

I also tried

Change: $2 (change format to first para style)

Both search and replaces changed both subexpressions to the first para style.

Basically, I just want the first para after a page break to not be indented. All other paragraphs are indented. When I search for text after a page break it changes the text of the page break which means the last paragraph of text on a page is also not indented, which is not what I want.

Upvotes: 0

Views: 106

Answers (0)

Related Questions