replace selected characters

G

Guest

I edit large scholarly documents for publication and have the regular need to
find and replace hyphens with En dashes. The Chicago Manual of Style
recommends En dashes in number ranges rather than hyphens, but most scholars
use hyphens in their manuscripts. I can use the wildcard feature to zero in
on the occurrences of hyphens in question by finding for "[0-9]-[0-9]". But
I cannot figure out how to replace all of the hyphens that I find this way
with En dashes. If I just place an En dash in the Replace box I replace part
of the portion of the number range found with the wildcard. Help!
 
B

BruceM

Try searching for ([0-9])(-)([0-9]) and replacing it with \1--\3
I used the double hyphen to represent an em dash, which I don't know how to
make readily in a text-only message.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top