Search/replace help in Word, need answer fast!

I have an index that I’m redoing. Among the things I need to do is turn 16,658 hyphens into en-spaces. I know how many there are because I accidentally hit “replace all” and had to undo it, because most of the hyphens need to be replaced, but not all of them.

I know how to search for any digit next to a hyphen. What I need to know is how to replace just the hyphen without replacing that digit. That ought to do it.

Otherwise I’m going to spend the whole day hitting “return, return, return…click on next…click on replace…return, return, return.”

Any help appreciated!

from Word help

When the Use wildcards check box is selected, Word finds only the exact text that you specify. Notice that the Match case and Find whole words only check boxes are unavailable (dimmed) to indicate that these options are automatically turned on. You can’t turn off these options.
To search for a character that’s defined as a wildcard, type a backslash () before the character. For example, type ? to find a question mark.
You can use parentheses to group the wildcard characters and text and to indicate the order of evaluation. For example, type <(pre)*(ed)> to find “presorted” and “prevented”.
You can use the
wildcard to search for an expression and then replace it with the rearranged expression. For example, type (Ashton) (Chris) in the Find what box and \2 \1 in the Replace with box. Word will find Ashton Chris and replace it with Chris Ashton.

If what you’re looking to replace is a digit and a dash, then you only have to do it ten times, once for each digit.

ditto

Winner

First, make sure Track Changes is OFF. Then make a test copy of the file to run this on first!

On the Replace tab:

More > Use Wildcards (check the box)

Find what: ([0-9])-

Replace with: \1^s

Replace All.

Scarlett67 thank you! I had to replace the “s” with the en-dash character (otherwise I got a space) but that was easy enough to figure out.

Yeah, in the time it took me to try to figure this out and try various things, I COULD have done the search once for each character. But this has come up before (although not with so many of them) and it will come up again, and now I have the answer.

So thanks all of you for your help!

Ah. Your OP said en space, which is what I thought you wanted for some reason (though en dash makes more sense).

Glad to help!

Oops, yep, I did! And it turns out there were only 15,164 of them. (There are still the ix-xi and the a-e and the C-F ones, but not as many).