LOWriter: how to Find-and-Replace carriage returns?

My attempts to search for a “hard return” have failed. I’m using the term carriage return colloquially because it represents what I’m trying to edit, and I can’t actually identify what I’m seeing in the typed page. The single workaround I’ve found is to backspace over them inside the document, in my case to replace with a new line. One edit at a time works and appears on the page as I expect, deleting ¶ (pilcrow sign=PS) and overwriting ↵ (new line=NL), with View/Formatting Marks toggled on.

  • 7.1 help docs claim the special character selector can be reached using CTRL+Shift+S in Find-and-Replace (FaR) dialogue fields, but that doesn’t work.
  • I can select the Insert/Special Character… menu with FaR fields, but I can’t copy, paste, type, or even discover what that “hard return” character is; it doesn’t seem to exist in character sets I’ve compared.
  • It appears PS is a working symbol that I can type or paste, but it doesn’t encode anything inside LO, like a CR, CRLF, or NL.
  • I can type a “hard return” with the Enter key, and a “soft return” with Shift+Enter, but not inside FaR fields.
  • I can copy and paste the end of a text line into FaR fields but it’s interpreted as only NL, as if PS isn’t there.
  • I didn’t find any help on breakout characters, if that’s something I have yet to discover in LO.

Basically, I was putting lists into Thunderbird Mail messages and I hit formatting issues, and when I copied edited content from LO the mystery grew worse. Thunderbird’s default formats are invisible within its HTML environment, only seen as outcomes, and a combination of pasted NL and CR content turns into a mess that can only be fixed one line at a time inside Tbird. The short answer is to ensure any Tbird pasting defaults to Body Text, contains new paragraphs, and excludes NL. This means I need to FaR any NL from the original text, requiring knowledge of how to deal with the new paragraph marker per my question.

If you paste into Writer from Thunderbird, it could be simpler to Edit>Paste Special>Unformatted Text so that any T’Bird formatting is removed. You are then only faced with paragraph breaks in Writer.

I’ve not tried the other direction but it is very likely that T’Bird doesn’t understand Writer formatting and will accept only plain text.

Came back one last time to emend that this is infinitely more complex than I assumed. Now, I can edit CR/NL in LOW, but anything pasted between LOW and TB is subject to both applying automatic formatting, without removing all formatting as a nuclear option.

To keep desired partial formatting, the best I can do is paste paragraph separated lists from LOW into TB as “body text” format, then toggle list formats to maintain the structure should I continue editing inside TB. Frustrating, but it works as long as TB’s “paragraph” format isn’t invoked. The advantage of LOW is detailed formatting tools and visible hidden characters, whereas TB’s editor is simplified, somewhat appropriate for email.

What you see with View>Formatting Marks are visual clues for internal data. It helps diagnose author errors in formatting.

The pilcrow clue tells you have a paragraph break. This is not “character” by itself but a full data structure. Since this is not a document character, you can’t copy it into a Search or Find & Replace field.

There are also limitations with F&R: it operates on a single paragraph content (meaning the search pattern can’t cross paragraph breaks). The paragraph break is located “between” paragraph and consequently can’t be caught by a pattern targeting text.

There is a special pattern, though, when regular expressions are enabled: $ (and nothing else) which will hit on paragraph breaks. You can replace the paragraph break by any string except a line break because there is no representation for it. If you enter \n in the search box, it is understood as “line break”, but in the replace box it means “paragraph break”.

Usually, it is not wise to replace paragraph breaks Enter by line breaks Shift+Enter because it create a huge paragraph and formatting becomes more difficult.

So, please, edit your question to explain your goal. Line breaks in Writer should be reserved for special purpose formatting and must not be used routinely. With this additional information, you’ll receive better advice.

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!

Don’t use “Add answer”. In Question & Answer sites, answers are reserved for solutions.

Goal cut off; too long.

You’ve provided the answer to my question, regular expression the critical detail I was missing. I don’t like my term “breakout,” like another language to the wrong audience. I missed the “Regular expressions” toggle inside the FaR dialogue, a key mistake. That toggle is never mentioned in Regular Expression help pages, probably considered out of scope, but it finally came together when I found “Using Wildcards in Text Searches” reiterating the toggle detail and linking back to FaR. I’m just peeved that the Regular Expression list page didn’t mention dependence on enabling.

ajlittoz: to summarize, now I can experiment with regular expressions, achieve my goal, and I learned what I was missing from your answer. Wouldn’t it be more concise if I summarize my comment with only the paragraph above, about the regular expression enabling, then check off your answer? Do you still feel adding my goal to the question would be useful?

@shyhook: it is always difficult to find the right size for an answer because contributors have no idea about skill and practice level of askers. Also, beyond a terse answer, a bit of context and explanation does not harm.

I have emboldened the key information.

Don’t forget that this board also serves as a questionnaire for people who look for solutions for their problems and first search the place before actually asking a question.

Ok, I’ll add context and a Thunderbird tag.