How to replace text with style formatting

Hi,

LibreOffice Writer 4.4.0.3 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.

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

Thanks

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

That’s a kind of reStructuredText or markdown

use the tools which are disigned for…

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