Warren,
Is this program something like what you were looking for?
Notice, Warren, things get tricky if you have to worry about end-of-line hyphens. For instance, in the case of "mother-\nin-law", you would want to retain the hyphen upon reconstitution. On the other hand, given "sesqui-\npedalianism", you would want the hyphen to disappear when you put the
word back together.
HTH
Art