Ask Your Question
0

Find character and replace with a new line

asked 2019-06-03 12:11:19 +0200

sherab gravatar image

updated 2019-06-03 12:16:32 +0200

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 flag offensive close merge delete

Comments

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.

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

2 Answers

Sort by » oldest newest most voted
0

answered 2019-06-03 14:17:19 +0200

sherab gravatar image

Hi ll thanks for your answers

As it happens I did manage to find a solution.

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

It seems to work.

edit flag offensive delete link more
0

answered 2019-06-03 12:50:06 +0200

Opaque gravatar image

updated 2019-06-03 12:50:55 +0200

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:

image description

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

If the answer is correct or helped you to fix your problem, please click the check mark (✔) next to the answer.

edit flag offensive delete link more

Comments

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

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

See also: https://bugs.documentfoundation.org/s...
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.

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

Great I'll have a look thank you

sherab gravatar imagesherab ( 2019-06-03 14:18:47 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-06-03 12:11:19 +0200

Seen: 52 times

Last updated: Jun 03