Page 1 of 1

[Solved] Find and Replace paragraphs

Posted: Mon Jun 11, 2018 9:00 pm
by rp2784
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?

Re: Find and Replace paragraphs

Posted: Mon Jun 11, 2018 9:17 pm
by RoryOF
Use Find and Replace. In Find put ^$, in Replace put nothing, drop more options and check "Regular expressions", then press Replace all.

Re: Find and Replace paragraphs

Posted: Tue Jun 12, 2018 12:20 pm
by rp2784
Solved. Thanks!

Re: [Solved] Find and Replace paragraphs

Posted: Tue Jun 12, 2018 1:51 pm
by RoryOF
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.

Re: [Solved] Find and Replace paragraphs

Posted: Wed Jun 13, 2018 12:53 pm
by rp2784
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

Re: [Solved] Find and Replace paragraphs

Posted: Wed Jun 13, 2018 12:57 pm
by RoryOF
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".

Re: [Solved] Find and Replace paragraphs

Posted: Wed Jun 13, 2018 1:45 pm
by rp2784
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.

Re: [Solved] Find and Replace paragraphs

Posted: Wed Jun 13, 2018 2:06 pm
by RoryOF
On Find and Replace, did you drop "More options" and check "Regular Expressions"?

Re: [Solved] Find and Replace paragraphs

Posted: Wed Jun 13, 2018 2:23 pm
by rp2784
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".

Re: [Solved] Find and Replace paragraphs

Posted: Wed Jun 13, 2018 2:39 pm
by RoryOF
A small uploaded sample file would help.

Re: [Solved] Find and Replace paragraphs

Posted: Wed Jun 13, 2018 3:55 pm
by rp2784
Extra Pargraph test.odt
odt document
(12.19 KiB) Downloaded 211 times
Here is a sample

Re: [Solved] Find and Replace paragraphs

Posted: Wed Jun 13, 2018 4:44 pm
by RoryOF
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).

Re: [Solved] Find and Replace paragraphs

Posted: Sat Jun 16, 2018 12:15 pm
by rp2784
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.