My solution assumes, that there are paragraph breaks, but your finally provided text does not contain paragraph breaks but line breaks. So my solution will not work for your text. Your task was much clearer, if you would have provided an example file from the beginning.
The placeholder for ‘EndOfParagraph’ ($) placed as the only character in '‘Search For:’ and the space in ‘Replace With:’, RegEx enabled, will do the first step. This will not only work for empty paragraphs or single line paragraphs. If there are additional replacements wanted a second step is necessary.
You may also check if the extension ‘AltSearch’ (Aölternative Serach & Replace / Installation from .oxt needed) has more capabilities. It is not very efficient with th kind of task.
Lupp, I had already posted the inelegant solution. Perhaps, you did not read this thread adequately. Unlike you!
Please take a look at an earlier thread: using regular expression to clean up texts?
Quoting @bkpsusmitaa: “Unlike you!”
I don’t understand.
Well, I read the posts and I only added an answer because I got the impression that posters, in specific yourself, mixed up the $
as used in ‘Serach For:’, the pilcrow glyph ¶
used as a ‘Formatting Aid’ in ‘Writer’ if enabled, and the paragraph break itself. My answer and my comment to your question are correct with this respect.
I only may add that a search for a hard linebreak (not creating a new paragraph) is done with \n
.
@bkpsusmitaa again :
In advance of another editing of your question you had inserted “I could have done it by changing double para marks $$ into something like !!!” My comment was thought to be helpful for better understanding with this respect. $$
is not searchable after all.
(Please note that \n
has a different meaning in ‘Replace With:’).
Feel free to downvote my answer.