
The power of regular expression combines with supported options in grep makes this possible. It’s often used to filter out unnecessary details while printing just the required information from big log files. grep basically searches for a given pattern or regular expression from standard input or file and prints the lines that match the given criteria. Its name comes from another similar command in ed tool, i.e., g/re/p which stands for globally search for a regular expression and print matching lines. I will if I have to, but if there’s a free way, I would much prefer that.Grep, originally developed for Unix-based systems, is one of the most widely used command-line utility in Linux boxes. Searching around, I find that this can be done with ’s Style Utilities, but that’s $39 that I’d really rather not spend just for this.

Sadly, as far as I know, you cannot specify styles in GREP lookbehinds, and my InDesign scripting skills unfortunately leave an awful lot to desire. I am assuming a GREP find-and-replace is probably my best bet, but I cannot figure out any way to actually do it. Given that there are perhaps 250 or 300 headers in this book (and that the InDesign files have plenty of other problems apart from this), I would really, really like to be able to automatically change this. One of these things is that every time there’s a header, the paragraph following the header (which is supposed to be in some sort of with no first-line indent style) has the same header style as the preceding header, only manually overridden to look like with no first-line indent. I have inherited the InDesign files from the designer who set the original book, and there are certain things that lead me to believe that… well, that the guy knew nothing about how to use InDesign.

I am re-typesetting a book to be published in its second edition.
