Search hard carriage return

I have an old document that has a hard return at the end of every line. I’d like to search and replace those hard returns. I cannot find “hard return” or anything that speaks to me in the control-H box.

An old (2017) forum response to use a dollar sign – $ – as a stand-in for the paragraph marker does not work for me. Any suggestions? Am I just not seeing the item in control-H?

Hello,

see answer to this question Find characters before paragraph mark and replace with the found characters without the paragraph mark. Just tested and it works for me using $ in Search field and using a space character in Replace field (option [x] Regular Expressions checked)

Tested using LibreOffice:

Version: 6.4.5.2, Build ID: a726b36747cf2001e06b58ad5db1aa3a9a1872d6
CPU threads: 4; OS: Mac OS X 10.15.5; UI render: default; VCL: osx; 
Locale: de-DE (en_GB.UTF-8); UI-Language: en-US, Calc: threaded

Alternatively you may use extensions Alternative Find & Replace for Writer (AltSearch), which provides \p for paragraph and \n for new line.

Hope that helps.

To make the dollar sign usable in the search for paragraph breaks you need to enable Regular expressions.
Even then the break itself will only be part of the findings if it was entered as the only character in Find:. If any context is given the $ only stands for till end of paragraph.
You can replace, however the paragraph breaks for a selected range by whatever meets your need - except hard line breaks because there is no way to make them part of the Replace:.

If you in fact didn’t want to search for paragraph breaks but for hard linebreaks, you need to enter \n (Backslash+n) into Find:.

(Always show Formatting Marks to be able to distinguish.)

\n worked beautifully.

To use $ and other “special” markers, you must first enable expand Other options and tick Regular expressions check box.

Enter $ in Find and ensure Replace contains a single space.

Press Find Next to find the next end of paragraph. Press Replace only if you think this is not a real paragraph end by a mere line wrap.

Keep the paragraph markers where they denote true end of paragraphs.

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.

The key to the correct answer is to enable “Regular Expressions” – even though $ is hardly the “regular” expression one would use for a paragraph marker or hard return. If you don’t have the “Regular Expressions” box ticked off, then the $ is just a dollar sign.

Regular expressions have their syntax which must be regarded. There wouldn’t be any sense in changing it for every specific application including RegEx search in an arbitrary way. LibO comes with the RegEx engine by ICU.
The $ actually is treated in a slightly different way by the RegEx interface in LibO. This is related to the fact that the search generally works on one paragraph at a time - of which the break itself not is a part.
Creating a special exception, the search for $ is extended to the full text (of a selection if applicable) spanning all its paragraphs if this dollar sign is the only character placed in Find:
RegEx actually is a powerful means, and estimating its ways sensibly requires knowledge.
Yes. There may be puzzles. At least there are things puzzling me.