Though most people don’t know (or care when told), the correct character to use for a range of numbers is the en dash (–), not the hyphen (-). Even if you’re committed to using en dashes between digits, hyphens are a tad easier to type,1 making a find and replace necessary at some point. If you’re diligent and use the en dash faithfully, you will undoubtedly get a rogue hyphen in there somewhere if you do any copying and pasting from the internet or other documents that don’t consistently use the correct character.
A simple find and replace (- for –) would do the trick—if you wanted to replace all hyphens with en dashes. But you don’t want to do this, since hyphens in hyphenated words are correct. :) Alternatively, you could run that query but, instead of replacing them all at once, replace one at a time only the ones that appear between digits. But this could be time consuming on a large document like a dissertation. Another option would be to set up a query to find 0-0 and replace it with 0–0, then 0-1 with 0–1 and so forth, but that would require 100 different searches and probably take longer than the previous method! The previous method could probably be simplified by dropping the second digit since there aren’t likely to be any instances when you’d have a digit followed by a hyphen not followed by another digit. That would make only 10 find-and-replace queries. So this is as least doable, though still not ideal.
Fortunately, there is a better solution than any of these.
What we want to do is find any single digit followed by a hyphen followed by another single digit and replace the hyphen with an en dash, leaving the digits unchanged. I tried to use the special digit character, ^#, and came up with a query like find ^#-^# and replace it with ^#–^#, but this didn’t work because ^# is not valid in the replace field.
I knew there had to be a way to do it, but I couldn’t figure it out. So I went to Google and found my answer in just a minute or two.
Here’s what you do:
- In the “Find what” field, enter ([0-9])-([0-9]).
- In the “Replace with” field, enter \1–\2 (note that that’s an en dash, not a hyphen).
- Check the box “Use wildcards.”
- Click “Replace All.”
That’s it. Much easier than any of the other methods. See the article for more details and an explanation of the search syntax.
- To type an en dash in Word, you can either use the default key combination Ctrl + – (the one on the keypad) or create your own shortcut. My shortcut is Ctrl + – (the one on the main part of the keyboard). ↩