In Word, this has always been done using ^p to demark a paragraph break and it is simple. Your product does not appear to do that because you apparently use $ as your break symbol and entering that into a find and replace is always “not found” unless there is an actual dollar sign in the text of the document.
$ only means a paragraph break in
F&R if the option
Regular expressions is enabled.
In addiotion: Generally F&R doesn’t find text portions across paragraphs. The
$ used in a regular expression is a kind of shortcut for a special lookahead assertion. The break itself isn’t part of the finding.
Confusing exception: If you serach only for
$ (without any accompanying character) the break itself can be replaced.
Use the extension AltSearch.oxt. It can do what you want…
https://ask.libreoffice.org/t/is-there-an-easy-way-to-find-a-paragraph-mark-and-replace-it-with-a-line-ending-or-a-space/8129 is one of many related questions which you might find by entering e.g. replace paragraph in the search box above
Is there an easy way to find a paragraph mark and replace it with a line ending or a space is one of many related questions which you might find by entering e.g. replace paragraph in the search box above
What you must understand to use built Find & Replace efficiently is the data on which it operates. Extension AltSearch works with different principles.
In the structure internally representing the document, there is no such character “paragraph break”. Paragraphs are primary objects with various attributes like content. Your document is an ordered sequence of these object paragraphs. Technically there is no need for a paragraph break because paragraphs are accessed from a “dictionary”.
Built-in Find & Replace, contrary to AltSearch searches the paragraphs one after the other for a match. This means a looked-for string cannot span several paragraphs because there is no way to describe the switch between paragraphs.
Within a paragraph, you can use a regular expression to define the search target. The pattern is written with the usual regexp syntax where
^ represents the beginning of the paragraph (position before the first character) and therefore cannot be used to “escape” from character meaning and
$ represents the end of the paragraph (position after the last character).
Special meaning for
$ (and others) is activated only when you enable Regular expressions otherwise they keep their character literal meaning. Within regular expressions,
\ is used to escape from special meaning to “quote” the next character.
Read built-in help for more information.
There is one special case. If regular expression is
^$, it means empty paragraph and it allows to remove these without the burden of tracking them by hand. This is the only case where the paragraph mark, as the full paragraph object, can be processed by built-in Find & Replace.
The fact there is no representation for “paragraph break” also means you cannot split a paragraph into two. The data processed by built-in Find & Replace always remains content of a single paragraph. Even if you insert a line break as
\n in the replacement string, this does not split the paragraph. You must make the difference between line break and paragraph breaks. The consequences appear in formatting and styling.
To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!
In case you need clarification, edit your question (not an answer which is reserved for solutions) or comment the relevant answer.