On Tue, 15 Apr 2014 07:44:13 -0000, Allen Schaaf 
<netsecur...@sound-by-design.com> wrote:

I get a lot of documents that have multiple end of paragraph
elements and I have never figured out how to find and replace 3
(or whatever) with 1 to clean up scanned documents and documents
that were deliberately double spaced with EOPs rather than simply
setting the leading.

the problem is that the find-and-replace function has its vision limited to 
only one paragraph if regular expressions are enabled, and if they are not, 
then there is no way to enter the end-of-line character into the 'search for' 
box. however, you can merge all your text into one paragraph to lift this 
limitation.

just enter '$' to the 'search for' box and '~~~~\n' (or something equally 
square to mark line breaks) to the 'replace with' box, then perform in turn the 
'replace all' and 'find all' operations and hit the 'delete' key on your 
keyboard (prepare to wait a couple of minutes here if the document is long 
enough; you will not see any progress bar, so the program will confusingly seem 
freezed). after that, the find-and-replace's field of vision is no more limited 
to one paragraph (well, it is still limited, but that paragraph now contains 
all the text), so you may replace three consecutive ~~~~ marks with one and 
then replace them back with '\n'.

another way is to install the altsearch extension:

http://extensions.openoffice.org/en/project/alternative-dialog-find-replace-writer-altsearch

one of its features is that searched or replaced text can contain one or more 
paragraphs. however, i have never tried it.

-------------------------------------------
List Conduct Guidelines: http://openoffice.apache.org/list-conduct.html
To unsubscribe, e-mail: users-unsubscr...@openoffice.apache.org
For additional commands, e-mail: users-h...@openoffice.apache.org

Reply via email to