“Non-printing paragraph mark” creates paragraph break. So, if you want to get rid of this mark, you effectively remove new paragraph break in this place. I suppose it’s what you actually want to do; e.g., this might happen if you import some “formatted” plain text, or a scan result, and you assume that if there’s not a dot before the paragraph break, then this paragraph break should be eliminated.
LO’s own Find and Replace dialog is unable to remove paragraph breaks in Regex mode (it operates in one paragraph’s boundaries only; the only explicit exception is removing empty paragraphs by using ^$
). So, you might consider AltSearch extension for that.
The proper find string for that task would be ([a-zA-Z0-9]+)$
(note the parentheses), and replace would be \1
(first back-reference plus a space).
EDIT (2017-05-17): the file that you finally attached is a bright demonstration why the samples must be provided to make it clear what’s the problem is.
The file has only one paragraph in it, and multiple line breaks (not paragraph breaks!). Each “wanna-be-paragraph” is delimited by two successive line breaks; all other line breaks should be converted to spaces. So, taking into account LibreOffice’s List of Regular Expressions (saying: \n in the Find text box stands for a line break that was inserted with the Shift+Enter key combination
; \n in the Replace text box stands for a paragraph break that can be entered with the Enter or Return key
), we need just these two steps with usual Find and Replace dialog and Regular Expressions checked:
- Search for
\n\n
and replace with \n
.
- Search for
\n
and replace with
(single space).
That’s it. If you would provide the sample right at the start (by e.g. sharing in a public service like DropBox), the solution would be really quick.
EDIT 2: the attached file, despite being named Bertrand.odt
, actually is a plain text file that has LF
s as line breaks. On opening with LO, the breaks are treated depending on LO’s formatted text settings, where you may choose if LF
s, CRLF
s or CR
s are treated as paragraph breaks. So, opening it so that LF
s stay as line breaks, allows for my solution above.
EDIT 3: here is the exact sequence to do with the file Toughening up.odt
(that is actually another plain text file, again):
- Rename it to
Toughening up.txt
- Open LibreOffice Start Center,
File
-Open
, and choose Text - Choose Encoding (*.txt)
in File Type drop-down list. Select and open the Toughening up.txt
. In ASCII Filter Options
dialog, choose CR & LF
as Paragraph break
- Search for
([.])\n
and replace with $1\n
.
- Check if all generated paragraph breaks are correct.
- You might want to extend the repertoire of characters in square brackets.
- Another (equivalent) find-replace pair is
(?<=[.])\n
→ \n
- using Look-behind assertion.
- Search for
\n
and replace with
(single space).