Thread: Word question
View Single Post
Old 08-24-2010, 03:58 PM   #3
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
You could try the following, which is 4 passes. I wrap them in a Word macro to make it less tedious.

Pass 1 - with 'Use wildcards' option unchecked
Code:
Find:^w^p
ReplaceAll:^p
Pass 2 - with 'Use wildcards' option unchecked
Code:
Find:^p^w
ReplaceAll:^p
Pass 3 - with 'Use wildcards' option checked
Code:
Find:([!-])^13([a-z])
ReplaceAll:\1 \2
Pass 4 - with 'Use wildcards' option checked
Code:
Find:([-])^13([a-z])
ReplaceAll:\1\2
Notes:
  • Pass 1 - remove trailing spaces
  • Pass 2 - remove leading spaces
  • Pass 3 - remove end-of-paragraph char and replace with space if last-char of 1st line is not hyphen AND first-char of next line is lowercase a-z
  • Pass 4 - remove end-of-paragraph if last-char of 1st line is hyphen and first-char of next line is lowercase a-z
jackie_w is offline   Reply With Quote