Ask Your Question

I am trying to replace the paragraph charachters with line break, can't figure it out. Dosen't have option for paragraph break, or does it, or i can't figure that out either. [closed]

asked 2015-08-04 16:53:10 +0200

msearfoss69 gravatar image

updated 2020-08-06 20:09:06 +0200

Alex Kemp gravatar image

Have most recent version, 4.4.5 Using English, writer. I just downloaded this two days ago.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2020-08-06 20:11:03.976121

2 Answers

Sort by » oldest newest most voted

answered 2015-08-04 20:33:14 +0200

Alex Kemp gravatar image

As best as I can tell, this can only be achieved with a macro due to an LO RE bug. Possible Macro help here (not accessible when I tried it). You can replace a Line-Break with a Paragraph, but not the other way around. Possible extension fix here.

If you are trying to do this via a macro:

  • Paragraph character (¶): U+000D CR Carriage Return (0x0013)
    (entered at keyboard with Enter key or Return key)
  • Line-Break character (↲): U+000A LF Line Feed (0x00010)
    (entered at keyboard with Shift+Enter key or Shift+Return key)

By menu (cannot work):

  • (menu):Edit|Find & Replace... (Ctrl+H)
    now select Other options then Regular expressions

This is not quite as straightforward as it may seem to those experienced with RE due to LO/OO quirks. The RE help says:-

$ on its own matches the end of a paragraph. This way it is possible to search and replace paragraph breaks.

However, if:-

Find: $
Replace: \n

Nothing happens on Replace all! (it just replaces a Pilcrow ¶ with another ¶). Here is why:-

LO Help on "\n":

Represents a line break that was inserted with the Shift+Enter key combination. To change a line break into a paragraph break, enter \n in the Search for and Replace with boxes, and then perform a search and replace.

\n in the Search for text box stands for a line break that was inserted with the Shift+Enter key combination.

\n in the Replace with text box stands for a paragraph break that can be entered with the Enter or Return key.

What the Help does NOT say (and needs to say) is that, in general, RE cannot be used in the Replace box. Jeez, but that is annoying.

If helps then please tick the answer (✔).

edit flag offensive delete link more


This is super helpful. And confusing also. Thanks!

iamkaant gravatar imageiamkaant ( 2020-05-27 16:17:06 +0200 )edit

answered 2015-08-04 21:07:23 +0200

pierre-yves samyn gravatar image


This is possible without macro:

  • Type a new line (Shift+Enter) in the (a) document, copy it
  • Edit Find & Replace
  • Search for: $
  • Other options check Regular expressions
  • Click Find All (all paragraph marks selected), keep the selection, close the dialog
  • Edit Paste, that's it...

it is also possible to use AltSearch extension proposes many other possibility.

edit flag offensive delete link more


Thanks for your answer, it works for me. And indeed, the AltSearch extension works as well: \p matches a new paragraph and \n is a newline character. BTW, the URL of the AltSearchextension has changed:

user4657 gravatar imageuser4657 ( 2018-04-24 16:27:17 +0200 )edit

Question Tools



Asked: 2015-08-04 16:53:10 +0200

Seen: 6,112 times

Last updated: Aug 04 '15