Frequently asked questions - Writer

From The Document Foundation Wiki
< Faq‎ | Writer
Jump to: navigation, search

What are the codes used to Search & Replace using regular expressions?

For help in Writer, select Help ▸ LibreOffice Help ▸ Index ▸ Regular Expression ▸ List.

You will get a table with a lot of regular expressions.

In the Edit ▸ Find & Replace menu, Other Options button, check Regular Expression and:

To Find Enter
Previous versions Version 4
non-breaking space \x00A0 \xA0
line break $ $
row break \n ou \x000A \n ou \x0A
tab \t \t

Warning: \n is a row break (Shift + Enter) in the Find field but a line break (Enter) in the Replace with field.

Precision : $ is not really the end paragraph character. It means "at the end of the paragraph". For example, if you want to find cause$ you will find cause or the end of the word because etc., if these words are at the end of a paragraph. But LibreOffice will not select the end paragraph character. It is only when you search for $ that is to say an empty string that LibreOffice will select the end paragraph character.