Reply To: Selecting Next Paragraph following another one using Grep

Home Page / Forums / General InDesign Topics (CLOSED) / Selecting Next Paragraph following another one using Grep / Reply To: Selecting Next Paragraph following another one using Grep

#60051

Cannot be done. (Admittedly, I've said that before on a number of occasions and got proven wrong …)

The reason is, to apply your style only the next paragraph, you need a Lookbehind containing “myWord” and its own hard return. (Look, backslashes! One: r Two: \r Three: \r — you need to type two to insert one, and so on. :D ) But between the myWord and hard return, you need a non-quantifiable repeat-anything code — your dot-asterisk — and that makes the Lookbehind invalid. InDesign's GREP library just can't do it.

If you need this in a real world situation and really can't afford to miss one, you'd probably work around it by first giving all paragraphs containing “myWord” a color, extending up to the paragraph return and one character beyond it (!), so you can search for “any character” in that particular color at the start of a paragraph.

This article was last modified on July 14, 2011

Comments (0)

Loading comments...