- Ctrl+H to launch Find and Replace dialog.
- Check "Use wildcards".
- Type
<([0-9]@)-([0-9]@)>
in the "Find what:" box. This pattern represents a search for whole words that have one number, a hyphen, and another number. - Type
\1^=\2
in the "Replace with:" box. This maintains the numbers found in the find, while substituting the hyphen with an en dash. - Click the "Find Next" button to step through each instance and replace. I do not recommend using Replace All.
Created
April 18, 2025 21:00
-
-
Save frederickding/52607353c3bf6fbe26416de0398f95ef to your computer and use it in GitHub Desktop.
Replace hyphen in number ranges in Word with en dash
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment