# 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]

edit retag 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

Sort by » oldest newest most voted

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)

• (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.

more

This is super helpful. And confusing also. Thanks!

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

Hi

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.

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: https://extensions.libreoffice.org/ex...