Tuesday, April 29, 2008

Some simple find and replace strings in Word

I have often used these simple find and replace strings to edit Word files, and also some regular expression strings in Word to edit large Word files and Wordfast translation memories. Here are some simple searches that translators may find helpful when using Word's Find and Replace. In a subsequent post, I hope to take up some simple regular expression strings.

In all the instances below, F: refers to the string you need to enter exactly in the "Find what:" box and R: refers to the string you need to enter exactly in the "Replace with:" box when you press Ctrl + H in Word.

1. Replace soft returns by hard returns

F:^l

R:^p

2. Replace hard returns by tabs

F:^p

R:^t

3. Replace double spaces in front of a hard return by a single space and a hard return

(Note: "@" below represents a space that you enter using the space bar and is not the "@" character)

F:@@^p

R:@^p

4. Delete all graphics (images) in the document

(Note you could use a hard return (^p) in the Replace with box if needed. Don't enter anything in the Replace with box otherwise.)

F:^g

R:

5. Replace white space in front of units (such as kg and so on by a non-breaking space)

F:^wkg

R:^skg

(This will keep numbers and their units together even at the end of the lines).

Watch out for a subsequent post on regular expression searches in Word.

No comments: