View Single Post
  #1   Report Post  
TJ
 
Posts: n/a
Default How can I replace single spaces with double spaces in a docume

I tried (?.)[^32]{1;2}([A-Z]) and got an error msg saying "The Find What text
contains a Pattern Match experssion which is not valid."

I also tried .^w and got an error saying "^w is not a valid special
character for the Find What box or is not supported when the Use Wildcards
check box is selected."

Could someone tell me what I'm doing wrong?

Thanks!

"Klaus Linke" wrote:

If you don't have tabs or non-breaking spaces, you can replace ".^w" with
". " (dot followed by two spaces).

..^w will match a dot and any following whitespace (= any number of spaces,
tabs, non-breaking spaces).

Of course, it'll also insert two spaces after abbreviations, abbreviated
first names and so on.

A bit selective would be a wildcard replacement, say
Edit Replace, check "More Match wildcards",
Find what: (?.)[^32]{1;2}([A-Z])
Replace with: \1^32^32\2

This will only match a dot followed by one or two spaces and a capital
letter (at the beginning of the next sentence).
It would miss sentences that start with a number for example, but won't
match abbreviations like "e.g." followed by small caps text.
You may need to do some proofreading or do the replacements one by one in
any case.

Regards,
Klaus