Tricks with Global Search and Replace

Oh, the powers of word processing! If you have to deal with proofread and copy edit then there’s nothing like the power of something like Microsoft Word or Apache or Libreoffice. Jane Austen had no option but rewriting her manuscript by hand with ink and a goose quill pen. Ernest Hemingway had to pound it all out on a manual typewriter. But we fortunate moderns can do global search and replace!

Except … when it all goes sour. If you are careless you can utterly munge your manuscript. You may find yourself keying the entire thing in again, if you don’t take care with the dangerous Replace tool. An astute commentator likened Search and Replace to a magic spell. You have to word the incantation exactly, perform the ritual gestures with precision, or something demonic appears and bites off your head. So, here are a few hard-won pearls of wisdom when you sit down to modify your manuscript.

The very first thing, before you do anything at all to that document? Save a separate copy of it. Title it NovelMasterCopy or something. This means that in case of disaster you have something to go back to. If all your messing around works out, you can delete this copy. But if you make a horrible error, you have this to fall back on.

With that safety belt in place, onwards! The easiest changes involve words that are utterly distinctive and have no other forms in English. If you change the heroine’s car from a Chrysler to a Toyota, you are fairly safe. There’s not a lot you can do with a word like Chrysler. There are no words like chryslered, chryslerific, or chryslerfactual, that will trip you up when you peel out that pattern of letters and drop in Toyota.

If you’re uncertain, then don’t hit the button! Do not let the system automatically swap Toyota in for Chrysler. Instead, do a simple Search and the look at each and every occurrence of the word in the text. With luck there aren’t too many of them. If you can see that you didn’t (as I just did) create the word chryslerific, then you are good. Do a Global Search and replace, and let your heroine drive her Corolla away. Oh, and that’s a good point. Be sure as you glance at all the occurrences of Chrysler that the model of the car isn’t mentioned. If you referred to her Chrysler Voyager you have to go through and do a second search and replace for Voyager, turning it into Corolla.

Which leads immediately to a second complication. Suppose that not all occurrences of Voyager are about the car? Suppose there are voyagers to the New World, or to the bottom of the sea, or something? If only you had given her a Silverado in the first draft, then this wouldn’t be a problem. Now you’re stuck going through and peeling out those occurrences of the car model one by one, thus sparing all the voyagers to the New World.

It’s when you are hoping to replace a fairly common word that you hit major trouble. Far elsewhere on this blog I’ve written extensively about naming and the importance of names. My husband the computer scientist suggests that all writers begin by using distinctive and searchable names, like say Greek alphabet: alpha, beta, zeta. Then later on you search out zeta and replace that name with Gerald, or whatever you’ve decided. I can’t do that. The name of the character is important, almost the first thing that I begin with.

And this time, like an idiot, very early on I named the son of the pirate captain Frank, short for Francis. I wrote the entire book before realizing how silly Frank the Terror of the Spanish Main would sound when he grew up. Clearly the solution was to peel out Frank’s cognomen and replace it with a more piratical name. But then what about all the times when someone makes a frank remark, or comments like ‘Frankly, my dear, I don’t give a damn’?

When I put ‘frank’ into the search window the system told me the word occurred too often for searching. Not a surprise, since he was the protagonist. So that was the time to bite the bullet. I went and did a global replace anyway, turning every occurrence of Frank into Zed. Then I went and did more searches, to reverse infelicities like ‘zedly’ and phrases like ‘to be perfectly zed’ or ‘a harshly zed remark’.

If you do this, be absolutely certain that you do the whole document. I have heard of an author who changed a major character’s name, but didn’t hit the ‘search from the beginning’ key. This got her a novel where for the first hundred pages the villain was named Robert, and the the rest of the book he was Sherman. She didn’t notice, and submitted it to her publisher. Who didn’t spot it either! The mistake slid past the copy edit, the proofing, everything. It wasn’t until the book was out, and confused readers asked about what had happened to that rascal Robert, and who was this Sherman loser, that the error was discovered.

Also, check and double check before you hit the Replace All button, to be sure you spelled it right and that you didn’t accidentally add anything like an extra space. This is especially necessary if you’re using the Copy function. This is how I replace straight quotation marks with curly ones. Naturally all the single and double quotes should be either straight or curly, but not both. Do not ask me how I get a mixture of them into the manuscript, because I don’t know. By carefully copying the incorrect quotation mark, however, I can globally search for it and replace every instance of it with the right one. But I don’t want to add an extra space when I do that.

And remember the current format, to only put a single space after a period? You can search on that antiquated double space, and replace it with a single one. But be very careful as you do it, because believe me, searching for a single space will be impossible. Also, putting the space into the original Search can save you a world of hurt. Our own Phyllis Radford reports:

For “The Lost Enforcer” (co-authored with Bob Browm) we had a long series of scenes set in the Los Angeles Airport. We’d mixed and matched LA and L.A.
In clean-up I did a global search and replace of LA with L.A. Hit replace all. Do you know how many places in a 125K word book the combination of ‘la’ occurs? Second clean-up required a careful read through to fix all those random letter placements.
I now know that the judicious placement of a space on both the beginning and end of the find and the replacement would have saved me about 8 hours of work.

Which reminds us all that the final and most crucial thing to do is to reread the entire work over again yourself. You will of course work through all the search and replace tasks on your list before the work goes to the proofreader. But before you send it to her, read it with your own eyes. This kind of major computerized surgery on a work calls for a minimum of two sets of eyeballs, to be sure that everything went okay. No helpful red wiggly line will warn you that the heroine is driving a Toyota Voyager. Only you can see that.

 

Author

Share

Comments

Tricks with Global Search and Replace — 7 Comments

  1. I have read a work in which the author had changed a major character’s name from Godgifu to Gemma, except that she missed two places.

    And one where someone capitalized Mass, except with too much enthusiasm: it was MASS throughout.

    Search and replace is your friend as long as you remember that it hates you and wants you to look like an idiot.

  2. After dealing manually with a bunch of scanned text that has random CRs — presumably the scanner inserted them — I worked out a macro that replaces single quote+CR with single quote+CR in red type and larger font size. It then goes through and does the same with double quote+CR, period+CR, question mark+CR, and exclamation point+CR. Once that’s done, it goes through an replaces double CR in original size and automatic color with a space. After that, a straightforward proofreading has, so far, caught everything.

    I like to proofread in a large-ish screen view and ideally, especially in technical material, from bottom to top, so the eye doesn’t skip over.

    Hope this helps — don’t forget, a little use of macros, which you can record yourself, is really useful for repetitive tasks.

  3. I’m not clever enough to create a macro, alas. But I hardly ever work with anything but straight prose. And I’ve had mounds of practice, English-izing the Marian novels. They are purely British in spelling, which means color turns into colour and maneuver becomes manoeuvre. So every pitfall in Search and Replace that exists, I have done!

    • If you work with a new-ish version of MS Word or Office — and I’ve been forced to update — you have an option to use UK or US English in Spell Checking as a Language option.

  4. Back in the 70’s, I was taking a class in college under Jack Bickham, and he had to leave the room for a bit. When he returned, he said his publisher didn’t like the character’s name. Jack was all about the business of writing, so he wasn’t bothered by the request, but he was bothered by the work that would have to be done. He was going to have to completely have his manuscript retyped. He Fortunately, he didn’t have to do it himself. He just hired some students to do it, but the process was time consuming.

  5. I am always fond of the tale of the hapless author who changed his protagonist’s name from David to Derek… and then found himself in an awkward position of trying to explain away the hitherto unknown masterpiece of Michelangelo’s Derek…

  6. The first time I used a universal replacement, it was for “(space)not” to “n’t”. Wound up with words like “nevern’t” & “hardlyn’t”, etc. due to split infinitives. Fortunately, I found them immediately with spellcheck and just reversed the whole thing.

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.