Regular Expressions, Word, and the Writing Class

Some years ago, when I was moonlighting as a reviewer for EEBO, I learned how to use regular expressions to do more global find/replace searches in xml files–some years after that, it finally occurred to me that I might be able to use this in the writing classroom. Though I’m not sure my students would think so, one of the biggest problems young writers often face is a kind of indiscriminate, even lazy, use of weak verbs. I know they’ve heard the spiel before–weak verbs cause wordiness! Imprecision! Vagueness! The death of kittens! And yet, there they are–twenty per page, the dreaded verb to be.

So, in each class, almost every writing workshop, I ask for a list of weak verbs. With some help, we get them up on the board. Then comes the horror of conjugation–to be is particularly problematic. Am, is, are, was, were, been, being, is. I realized that this is just the kind of information that, if students don’t have it already burned into their brains from high school, it wasn’t really going to stick now. And if students don’t know how to recognize weak verbs–especially all those irregular ones!–how would they know to avoid them, much less why? Happily, when in workshops we tinker with language for happy effects, we always end up energized–but, it’s difficult for students to cultivate that distance they need to approach their work as an object outside of the self, something that can be shaped, reshaped, polished. I began experimenting with ways to use regular expressions and Word’s find/replace tool as a method for bringing weak verbs to students’ attention.

Okay, let’s back up a bit. What are regular expressions? According to Wikipedia,

In computing, a regular expression provides a concise and flexible means for “matching” (specifying and recognizing) strings of text, such as particular characters, words, or patterns of characters.

If you’ve ever done a slightly more complex search using wildcards in a full-text database like EEBO or ECCO, you’ve probably made use of regular expressions. In Word, there’s a regular expression-like code, ^&, which just replaces with the thing you found–and, in Word, you can also modify the formatting of the replace string, which means you can highlight whatever you find.

The basic idea was, if students could see the hailstorm of weak verbs embedded into their prose, perhaps the work of revising for wordiness, imprecision, dead kittens, and so on would be easier. What if we could find all forms of the verb “to be” and then replace them with exactly the same thing, only highlighted, so we can get a handle on the little rascals? Also happily, we can do this with a simple use of regular expressions, in conjunction with Word’s “find all forms” option in find/replace. Here’s a general overview from Microsoft on the subject of regular expressions in find/replace, and one for Open Office.

I give my students a step-by-step guide to the process (this uses an older version of Word):

  1. Open the find/replace dialogue box (Edit > Replace). Open the MORE portion of the dialogue box.
  2. FIND for the root of your weak verb (below, it’s BE), and select FIND ALL WORD FORMS (be sure the ‘find all forms’ appears below the ‘find’ box).
  1. REPLACE with ^& (code for ‘the same thing you find for’), and FORMAT it to highlight (be sure the ‘highlight’ appears below the ‘replace’ box).
  2. Click FORMAT and select ‘highlight.’ Note that the program will highlight in the currently chosen color—you might want to change that.
  3. Click REPLACE ALL. Click OK when the warning dialogue box appears. Word will find all instances of “to be” and highlight them for you! Now you can see how frequently you use weak verbs and revise accordingly.
  4. Remember to remove any highlighting before submitting your final draft. (CTRL-A and highlight NONE)
  5. NB: You can use this technique, with modification, to find almost any pattern you want to highlight in your own writing. Keep track of your habits, and cultivate self-awareness!

I also prepared an online tutorial, which students can watch on Vimeo. Usually, I’ll arrange for class to happen in a lab, or I’ll ask everyone to bring their laptops, and we work with either an anonymous student piece from another class, or one we’re workshopping–though I like to have students bring an electronic copy of their own draft, too, which they can work on independently. I’ll post or distribute the essay, and first ask students to work on their own or with a peer to find as many instances of the weak verb as possible. Then, I model the find/replace process, explaining the logic behind the exercise very carefully. We’ll take a look at how many uses of the weak verb actually appear, and typically, the initial response is a collective gasp. It’s a little eye-opening to see a document suddenly marked up with yellow highlighting, especially if students had gone over the draft first on their own, circling any weak verbs they could find. Then, we’ll go over a few sentences, and make a game of coming up with as many revisions as possible. This helps students to see that sometimes restructuring the sentences is the better option than simply finding a different verb, and it also models a few other methods for sentence-level revision.

Next, I have students work with the sample essay and learn how to use the find/replace, change highlighting colors, and search for other verbs–they’ll have questions, so I circulate and help them out or encourage them to get advice from a peer. Once everyone’s comfortable with the technology, I ask them to find five sentences to revise–this will often take much longer than learning the technology, so we devote a good 20 minutes of class to it. I’ll ask students to share a revision they’re particularly proud of, or one that’s just outrageous or weird. Then, they have the rest of the class to work on their own essays. Usually, I’ll do this activity on the date the first essay for the class is due; students always want more time to work on their drafts!

Do you have any experience using this feature with other word processing software? Please share your thoughts!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s