Find-Replace question

Everything related to our flagship word processor.
Post Reply
writerhoward
Posts: 50
Joined: 2013-02-03 05:10:26

Find-Replace question

Post 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
User avatar
Hamid
Posts: 777
Joined: 2007-01-17 03:25:42

Re: Find-Replace question

Post by Hamid »

In the Find field enter a dash and a space, and leave the Replace field empty.
Then press the Replace All button.
User avatar
martin
Official Nisus Person
Posts: 5228
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Find-Replace question

Post 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.
Attachments
Dash Fixup.nwm
(4.44 KiB) Downloaded 340 times
Post Reply