Find character and replace with a new line

In a book document with many paragraphs. In each paragraph I need to find the character '.' and add after it a new line - not a new paragraph.

Here's how i go about it at the moment

find : \ .

Replace .\n

but this does not work because it creates new paragraph rather than a new line within the same paragraph

Thanks

edit retag close merge delete

Did you consider that full stops at the end of sentences often (if not always in the addressed case) are followed by spaces?
In addition periods not followed by a space may be used with a different meaning.
Example:

Hkjhhjk ljljl jl. Ijkjhjoj. Pikpoipoipoi 15.33 oiuoiuoiu. Jhgjhgjh.


The way I interpreted your question, you might want to get:

Hkjhhjk ljljl jl.
Ijkjhjoj.
Pikpoipoipoi 15.33 oiuoiuoiu.
Jhgjhgjh.


for it.

And: If you replace the single full stop with a line break you get a subsequent space shifted to the new line.

( 2019-06-03 13:27:33 +0200 )edit

Sort by » oldest newest most voted

As it happens I did manage to find a solution.

find : \. replace : . ctrl+shift+U 000A

It seems to work.

more

Hello,

there is an extension called AltSearch.oxt at https://extensions.libreoffice.org/extensions/alternative-dialog-find-replace-for-writer, which allows for distinction of manual line break and new paragraph in Replace field - see screenshot:

Please note: "\n" hast a different meaning than in LibreOffice's internal Find & Replace dialog

more

Just did a short testing of AltSearch under LibO V6.3.0.0.alpha1.
It seems to still work with the next version.

( 2019-06-03 13:29:41 +0200 )edit

Having a way to insert unicode characters (including so-called controll characters) in replace strings (\u000A e.g. for a hard line break) would resolve the issue.

( 2019-06-03 13:45:43 +0200 )edit

Great I'll have a look thank you

( 2019-06-03 14:18:47 +0200 )edit