Page 1 of 1
Find-Replace question
Posted: 2015-05-28 15:52:33
by writerhoward
I have text with words containing a dash plus a space as in "indi- cates." I would like to find all the words containing a dash and a space and close them, so that "indi- cates" becomes "indicates." How can I do that using Find/Replace?
Howard
Re: Find-Replace question
Posted: 2015-05-28 23:45:25
by Hamid
In the Find field enter a dash and a space, and leave the Replace field empty.
Then press the Replace All button.
Re: Find-Replace question
Posted: 2015-05-29 14:15:39
by martin
Hamid's answer is correct, you can easily replace all dash space sequences "- " with nothing to delete them. However, this might also delete any dashes you've used in your writing that don't appear in the middle of words, for example:
This is a sentence– quick thought.
There's no way for find and replace to know that "sentencequick" is not a real word.
This might not be a problem, depending on whether or not you use different dash characters in different places in your writing. If these accidentally dashed words use a distinct character (eg: dash, en dash, em dash) you could reliably replace them.
If your dash characters are used ambiguously, we might still be able to fix most of the dashed words, and leave alone dashes that bridge to a sentence fragment. How? By using a macro and its access to the spelling dictionary. We know that "indi" and "cates" are not real words, so they should be joined; while "sentence" and "quick" should be left unjoined. I'll attach a macro that makes this distinction.