How InDesign and GREP Help Me Blast Through the Sunday Bulletin
Each week I am responsible for laying out the weekend bulletin at Henderson Hills. Once I get all of the copy laid out in InDesign CS3, I print a few proofs off for the communications team to proof read. Then I collect the revised copies and make the changes. One of the most frustrating things about editing the copy of the bulletin is that I seem to make the same corrections each week. We don’t have a very strict style guide at HHBC, but we do try to stay consistent with how we format dates and times, URLs, phone numbers, etc.
Before having the responsibility of the bulletin each week, I rarely used page lay-out software, the last of which was an archaic version of Pagemaker running on MacOS 8. I don’t know all there is to InDesign, but over the last few weeks I have focused on learning something new each week about the features and capabilities of InDesign. One day, while finding and replacing some text, I happened upon the GREP tab.
What is GREP?
GREP stands for Global Regular Expression Print. Makes perfect sense, right? You can read more about it here, but really all you need to know is that GREP is what would happen if Find-And-Replace finally got off of his lazy bum and went to the gym. GREP allows you to search for specific patterns in your text and manipulate the text in powerful ways.
GREP does not look like find-and-replace. It looks like this:
Find: \(?(\d\d\d)\)?[-.\s~~]?(\d\d\d)[-.\s~~]?(\d\d\d\d)
Change to: ($1)~S$2~~$3
That gem of confusion up there allows you to search for U.S. phone numbers in almost any format, and replace them with numbers in the format (800) 555-1212 with a non-breaking space after the area code and a non-breaking hyphen before the last four digits. That’s cool because I am constantly having to reformat phone numbers in the text that I am given. Over the past 3 weeks I’ve been able to find or write GREP strings (that’s what those lines of weird are called) that let me:
- Reformat phone numbers
- Remove mailto links (for some reason Entourage adds mailto links to all email addresses in plain text emails, where I get the copy)
- Keep all URLs and email addresses from breaking over two lines
- Change — and - to proper em-dashes
- Place one space between sentences (instead of two)
- Change all single and double quotes to typographer’s quotes
Some of these I found on Google, some are included in InDesign, some I modified from other examples. I now run these before I send the proofs out and it is saving me time. It takes seconds for InDesign to do the work for me.
There are other things I am hoping to figure out how to do with GREP or maybe even find-and-replace if it is capable. For example, certain words and places in our bulletin are always capitalized, certain phrases need to be changed depending on context (click on www.hhbc.com should read visit hendersonhills.com), days need to read how they are sounded out (August 22 should read August 22nd), commas between days of the week and the date, etc.
I thought I might be able to use a Mac OSX’s Automator to accomplish this, however, from what I have read, I think I could accomplish it all whithin InDesign with the right GREP strings and some JavaScript. Also, if I am understanding correctly, InDesign CS4 let’s me manipulate paragraph styles (another handy feature for speeding things up) using GREP. When I upgrade and if I am ever able to automate enough changes that the only changes made in proofs are for content, not style, I will let you know.
If you’re curious about any of the strings that I am using, leave a comment. Otherwise, check these links out:
- GREP in InDesign CS3 (eBook)
- GREP in InDesign CS3 (another eBook)
- GREP Searches in InDesign CS3 (more great links here)


