Old School typing errors corrected with GREP

When I was 13, my dad forced me to take a business typing class during summer vacation. It was awful, except for the cute girls who were a bit older, and a lot more sophisticated than I was.

The teacher was a stern woman named Mrs. Potter. She wore hard-heeled shoes that made a clack-clack sound on the hardwood floors at the business school.

The typewriters were strictly mechanical, and they had no labels on the keys. It was touch-typing at its worst. Clack-clack-clack.

And, there was no numeral one.

To get a one, you used the lower-case L. So l963 (that was the year) was lower-case L-9-6-3. Did I mention that this was a torturous experience?

I am grateful that my dad did this. He had vision, and he knew that I would need to know how to type in my lifetime. In fact I used my typing skills from that moment onward. I was pretty quick on the keys, and I learned how to use a variety of typewriter-based machines in the years that followed. Those included the Friden Just-O-Writer, a clunky typesetting machine that used a typewriter keyboard. When I got to college I had to learn the Linotype keyboard, which really messed up my QWERTY typing skills. I substituted ETAOIN and SHRDLU for the more common typewriter order.

In December an old friend of mine died at the age of 93. She was a newspaper editor, a civic volunteer, a writer, organizer and all around wonderful woman.

Her son sent me a manuscript to use for her memorial booklet, and I placed the text into an InDesign document to make it look nice, and to combine the text with some nice family photos of his mother.

Midway through editing the booklet I noticed what I thought was a lower-case L in front of a number for the year. Were my eyes tricking me? No they were not. In fact, all of the numbers one were lower-case L’s. I was amused because the author of the text is my age, and his typing habits were, I am sure, developed at the same time as mine.

It was easy to edit these out, replacing them with correct numeral 1’s.

I did it with an InDesign GREP search.

I asked InDesign to search for a letter l (lower case) followed by a wildcard for any digit. Then I asked it to replace the lower-case L with the numeral 1 and follow that with the same digit. It took about .5 second to complete the entire search-and-replace on the text.

I could possibly have done it by searching using a standard search string, but the GREP search ensured that I caught all of these characters. Some of them were not preceded by a space; some were preceded with a hyphen. It would not have been completely thorough.

The string looks like this to search for the letter “l” followed by any digit.


…which means “search for the letter l, assigning it to variable $1, followed by any digit, assigning that digit to variable $2.”

The replace string looks like this:


…which means “replace this with a numeral 1, and the original digit found. I drop variable $1 (which is always a lower-case L). That is what I am fixing in this search string.

This is the InDesign GREP window, showing both search and replace strings. It’s an easy one, but it saves a lot of time and trouble.

Modern GREP searches can overcome the typing habits of old guys like me! Even Mrs. Potter would like GREP.

About Brian Lawler

Brian Lawler is an Emeritus Professor of Graphic Communication at California Polytechnic State University, San Luis Obispo and was a Guest Professor at Hochschule München from September, 2021 to September, 2022. He writes about graphic arts processes and technologies for various industry publications, and on his blog, The Blognosticator.
This entry was posted in Language and grammar. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.