[Solved] Find and Replace paragraphs

Discuss the word processor

[Solved] Find and Replace paragraphs

Postby rp2784 » Mon Jun 11, 2018 9:00 pm

I've looked and looked all over for this and can't find it. I am looking to find two Paragraph returns and replace them with one. How do you do it? What is the Character Expression for Paragraphs?
Last edited by rp2784 on Wed Jun 13, 2018 1:58 pm, edited 2 times in total.
OpenOffice 4.1.15 on Windows 10
rp2784
 
Posts: 7
Joined: Mon Jun 11, 2018 8:51 pm

Re: Find and Replace paragraphs

Postby RoryOF » Mon Jun 11, 2018 9:17 pm

Use Find and Replace. In Find put ^$, in Replace put nothing, drop more options and check "Regular expressions", then press Replace all.
Apache OpenOffice 4.1.5 on Xubuntu 18.04 (mostly 64 bit version) and infrequently on Win2K/XP
14 October 2016 was Pooh's 90th birthday
User avatar
RoryOF
Moderator
 
Posts: 27183
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Find and Replace paragraphs

Postby rp2784 » Tue Jun 12, 2018 12:20 pm

Solved. Thanks!
Last edited by rp2784 on Wed Jun 13, 2018 12:47 pm, edited 1 time in total.
OpenOffice 4.1.15 on Windows 10
rp2784
 
Posts: 7
Joined: Mon Jun 11, 2018 8:51 pm

Re: [Solved] Find and Replace paragraphs

Postby RoryOF » Tue Jun 12, 2018 1:51 pm

Note that the procedure I outline above removes only blank paragraphs. If the paragraph has any character in it, even a single space, then the procedure I outline will not remove it. When doing this type of reformatting it can be helpful to turn on /View /Non printing characters to see exactly what is the content of paragraphs intended to be removed.
Apache OpenOffice 4.1.5 on Xubuntu 18.04 (mostly 64 bit version) and infrequently on Win2K/XP
14 October 2016 was Pooh's 90th birthday
User avatar
RoryOF
Moderator
 
Posts: 27183
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved] Find and Replace paragraphs

Postby rp2784 » Wed Jun 13, 2018 12:53 pm

Well it isn't solved. I went to delete the extra spaces, in a test and nothing happened. I copy and past into Writer from the web and that process has lots of extra returns in it. I just want to do a simple Find and Delete of the extra paragraphs.

1
2

3a

4

5
OpenOffice 4.1.15 on Windows 10
rp2784
 
Posts: 7
Joined: Mon Jun 11, 2018 8:51 pm

Re: [Solved] Find and Replace paragraphs

Postby RoryOF » Wed Jun 13, 2018 12:57 pm

Turn on /View /non printing characters; you will see that some blank lines have no Pilcrow (Backwards P) at the end. Adjust the Indents and Spacing tab on those paragraph styles to have zero "Space after paragraph".
Apache OpenOffice 4.1.5 on Xubuntu 18.04 (mostly 64 bit version) and infrequently on Win2K/XP
14 October 2016 was Pooh's 90th birthday
User avatar
RoryOF
Moderator
 
Posts: 27183
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved] Find and Replace paragraphs

Postby rp2784 » Wed Jun 13, 2018 1:45 pm

Sorry still not working. I understand about the non printing characters. The test I did was just a quick new page all from the the default setting of writer. No indent, Space after or before, I even selected the text and "cleared formatting" on the text. Still didn't find it.

In Microsoft Word and Adobe InDesign you can "copy" the non printing character and or type /p. I've tried copying from the manual, this string the ^$. nothing happens. It did work once and I thought the problem was solved.
OpenOffice 4.1.15 on Windows 10
rp2784
 
Posts: 7
Joined: Mon Jun 11, 2018 8:51 pm

Re: [Solved] Find and Replace paragraphs

Postby RoryOF » Wed Jun 13, 2018 2:06 pm

On Find and Replace, did you drop "More options" and check "Regular Expressions"?
Apache OpenOffice 4.1.5 on Xubuntu 18.04 (mostly 64 bit version) and infrequently on Win2K/XP
14 October 2016 was Pooh's 90th birthday
User avatar
RoryOF
Moderator
 
Posts: 27183
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved] Find and Replace paragraphs

Postby rp2784 » Wed Jun 13, 2018 2:23 pm

Yes. Let me make sure we are talking about the same thing. I copy and paste Guitar lyrics and chords from a website. I paste that text as "Paste Special" "Unformatted Text". In so doing this process put extra "Paragraph" returns in. So the text has a "row of lyrics" "Paragraph return" "Paragraph return". Then "row of lyrics" "Paragraph return" "Paragraph return". I want to get rid of the extra "Paragraph return".
OpenOffice 4.1.15 on Windows 10
rp2784
 
Posts: 7
Joined: Mon Jun 11, 2018 8:51 pm

Re: [Solved] Find and Replace paragraphs

Postby RoryOF » Wed Jun 13, 2018 2:39 pm

A small uploaded sample file would help.
Apache OpenOffice 4.1.5 on Xubuntu 18.04 (mostly 64 bit version) and infrequently on Win2K/XP
14 October 2016 was Pooh's 90th birthday
User avatar
RoryOF
Moderator
 
Posts: 27183
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved] Find and Replace paragraphs

Postby rp2784 » Wed Jun 13, 2018 3:55 pm

Extra Pargraph test.odt
odt document
(12.19 KiB) Downloaded 35 times
Here is a sample
OpenOffice 4.1.15 on Windows 10
rp2784
 
Posts: 7
Joined: Mon Jun 11, 2018 8:51 pm

Re: [Solved] Find and Replace paragraphs

Postby RoryOF » Wed Jun 13, 2018 4:44 pm

Find ^$, Replace <nothing>, More options: Regular expressions checked, "Replace all" worked for me on the file as downloaded. It did not work on the " D" and other non-blank paragraphs (/View /non printing characters to see their content).
Apache OpenOffice 4.1.5 on Xubuntu 18.04 (mostly 64 bit version) and infrequently on Win2K/XP
14 October 2016 was Pooh's 90th birthday
User avatar
RoryOF
Moderator
 
Posts: 27183
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved] Find and Replace paragraphs

Postby rp2784 » Sat Jun 16, 2018 12:15 pm

The key stroke [shift][6} does not work. If I copy and past the the [^$], from your initial response, it works correctly. I don't know what the Character Map is for the ^ is.
OpenOffice 4.1.15 on Windows 10
rp2784
 
Posts: 7
Joined: Mon Jun 11, 2018 8:51 pm


Return to Writer

Who is online

Users browsing this forum: No registered users and 21 guests