Ajuda do LibreOffice 26.2
Regular expressions are special patterns used to find and manipulate text, helping you locate specific information within texts.
A procura com recurso a expressões regulares difere da procura com caracteres universais. O LibreOffice Writer apenas tem suporte a procura com expressões regulares.
Pode utilizar expressões regulares ao localizar e substituir texto de um documento. Por exemplo, "s.l" localiza "sol" e "sal".
Escolha .
Clique em para expandir a caixa de diálogo.
Selecione a caixa .
Na caixa , introduza o termo de pesquisa e as expressões regulares que pretende utilizar.
Clique em ou em .
A expressão regular utilizada para procurar apenas um carácter é o ponto (.).
The regular expression for a word character \w, and \d for a decimal digit.
A expressão regular para zero ou mais ocorrências do carácter anterior é um asterisco. Por exemplo: "123*" localiza "12" "123" e "1233".
The regular expression to search for zero or more occurrences of any character is a period and asterisk (.*).
The regular expression for one or more occurrences of the previous character is a plus sign (+). For example: "\w+" finds any word, "\d+" any number.
The regular expression for a tab character is \t. More generally, \s stands for all kinds of "spaces", like non-breaking space, carriage return ...
The regular expression for the end of a paragraph is a dollar sign ($). The regular expression for the start of a paragraph is a caret and a period (^.). The regular expression for an empty paragraph is ^$.
When using regular expressions, you can insert Unicode characters in the replacement string using \uhhhh (4 hex digits) or \Uhhhhhhhh (8 hex digits) which will be expanded into their respective characters during the replacement.
A search using a regular expression will work only within one paragraph. That is, a \n will match a line break within a paragraph.