Ask Your Question

How to replace text with style formatting

asked 2015-02-01 09:56:32 +0200

L-user gravatar image

updated 2015-08-28 20:26:48 +0200

Alex Kemp gravatar image

LibreOffice Writer using LibreOffice PPA on Ubuntu 14.04.

I have a raw text file. In text file the heading text is underlined with multiple "=" characters. I would like to open this raw text file with Writer and intead of text underlined with "=" characters I would like to create heading stlye.

image description

It tried doing this Find/Replace regular expressions, but I can't figure it out how to do this. Any idea?

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted

answered 2015-02-07 13:40:18 +0200

pierre-yves samyn gravatar image

Hello, I think it is possible with 5 find & replace.

Edit> Find & Replace, click Other options and check "Regular expressions"

Note: In the following text "¿" and "µ" are not used letters in the text to process. Adapt if necessary.

Search for $ Replace with ¿ Replace All

Expected result: all paragraph marks are deleted

Search for ¿={1,}¿ Replace with µ\n Replace All

Expected result: all "=" replaced with µ and new paragraph

Search for ¿ Replace with \n Replace All

Expected result: restore the other paragraphs

Search for µ Find All

Expected result: only the text of titles is selected Type Ctrl+1, Heading1 is applied

Search for µ Replace with (nothing, keep it empty) Replace All

Done... Regards Pierre-Yves

edit flag offensive delete link more

answered 2015-02-01 18:58:09 +0200

m.a.riosv gravatar image

I think no possible with Find & Replace, but I think you can get it with alternative-dialog-find-replace-for-writer

edit flag offensive delete link more

answered 2015-02-02 08:37:07 +0200

karolus gravatar image

That's a kind of reStructuredText or markdown

use the tools which are disigned for...

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-02-01 09:56:32 +0200

Seen: 1,731 times

Last updated: Feb 07 '15