Uzi regulajn esprimojn en tekstaj serĉoj

Regular expressions are special patterns used to find and manipulate text, helping you locate specific information within texts.

note

Serĉi per regulaj esprimoj diferencas al serĉi per ĵokeroj. LibreOffice-Verkilo subtenas nur serĉi per regulaj esprimoj.


Vi povas uzi regulajn esprimojn kiam vi serĉas kaj anstataŭigas tekston en dokumento. Ekzemple, "fi.o" trovas je "fido" kaj "filo".

  1. Elektu jeRedakti - Serĉi kaj anstataŭigi.

  2. Alkalku je Pluaj agordaĵoj por etendi la dialogon.

  3. Marku la markobutonon Regulaj esprimoj.

  4. En la kampo Serĉi, tajpu la serĉotan terminon kaj la regula(j)n esprimo(j)n uzotajn en la serĉo.

  5. Alkalku al Serĉi sekvan aŭ Serĉi ĉiujn.

Ekzemploj de regulaj esprimoj

  1. La regula esprimo por unuopa signo estas la punkto (.).

  2. The regular expression for a word character \w, and \d for a decimal digit.

  3. La regula esprimo por nul aÅ­ pli da aperoj de la antaÅ­a signo estas la steleto. Ekzemple: "123*" trovas "12", "123", kaj "1233".

  4. The regular expression to search for zero or more occurrences of any character is a period and asterisk (.*).

  5. 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.

  6. The regular expression for a tab character is \t. More generally, \s stands for all kinds of "spaces", like non-breaking space, carriage return ...

  7. 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 ^$.

Nota bildsimbolo

A search using a regular expression will work only within one paragraph. That is, a \n will match a line break within a paragraph.


Bonvolu subteni nin!