Lista de Expresións Regulares

Carácter

Resultado/Uso

Calquera carácter

Representa o carácter dado a menos que especificado en contrario.

.

Representa calquera carácter, excepto quebras de liña ou de parágrafo. Por exemplo, o termo de busca "d.do" devolve tanto "dado" como "dedo".

^

Só localiza o termo de busca se está no inicio dun parágrafo. Ignóranse os obxectos especiais, tales como os campos baleiros ou os marcos ancorados a un carácter. Exemplo: "^Salvaterra".

$

Só localiza o termo de busca se está no final dun parágrafo. Ignóranse os obxectos especiais, tales como os campos baleiros ou os marcos ancorados a un carácter. Exemplo: "Salvaterra$".

$ Pola súa propia coincide co final dun parágrafo. Deste xeito, é posible buscar e substituír quebras de parágrafo.

*

Localiza cero ou máis caracteres antes de "*". Por exemplo, "Ab*c" localiza "Ac", "Abc", "Abbc", "Abbbc", e así por diante.

+

Localiza un ou máis caracteres antes de "+". Por exemplo, "AX.+4" localiza "AXx4", mais non "AX4".

Búscase sempre a cadea de caracteres do parágrafo máis longa posíbel que se corresponda con este patrón de pesquisa. Se o parágrafo contén a cadea de caracteres "AX 4 AX4", reálzase toda a pasaxe.

?

Localiza cero ou un carácter antes de "?". Por exemplo, "Texts?" localiza "Text" e "Texts", e "x(ab|c)?y" localiza "xy", "xaby" ou "xcy".

\

Search interprets the special character that follows the "\" as a normal character and not as a regular expression (except for the combinations \n, \t, \>, and \<). For example, "tree\." finds "tree.", not "treed" or "trees".

\n

Represents a line break that was inserted with the Shift+Enter key combination. To change a line break into a paragraph break, enter \n in the Find and Replace boxes, and then perform a search and replace.

\n in the Find text box stands for a line break that was inserted with the Shift+Enter key combination.

\n in the Replace text box stands for a paragraph break that can be entered with the Enter or Return key.

\t

Represents a tab. You can also use this expression in the Replace box.

\b

Match a word boundary. For example, "\bbook" finds "bookmark" but not "checkbook" whereas "book\b" finds "checkbook" but not "bookmark". The discrete word "book" is found by both search terms.

^$

Localiza un parágrafo baleiro.

^.

Localiza o primeiro carácter dun parágrafo.

& ou $0

Adds the string that was found by the search criteria in the Find box to the term in the Replace box when you make a replacement.

For example, if you enter "window" in the Find box and "&frame" in the Replace box, the word "window" is replaced with "windowframe".

You can also enter an "&" in the Replace box to modify the Attributes or the Format of the string found by the search criteria.

[abc123]

Representa un dos caracteres colocados entre os corchetes.

[a-e]

Represents any of the characters that are between a and e, including both start and end characters.

Os personaxes son ordenados polos seus números de código.

[a-eh-x]

Represents any of the characters that are between a-e and h-x.

[^a-s]

Represents everything that is not between a and s.

\uXXXX

\UXXXXXXXX

Representa un personaxe baseado no seu código hexadecimal Unicode de catro díxitos (XXXX).

Para caracteres escuros hai unha variante separada con U maiúsculo e oito díxitos hexadecimais (xxxxxxxx).

Para determinado símbolo Fontes do código para caracteres especiais poden depender da fonte utilizada. Podes ver os códigos escollendo Inserir - Carácter especial .

|

Finds the terms that occur before the "|" and also finds the terms that occur after the "|". For example, "this|that" finds "this" and "that".

{2}

Define o número mínimo de ocorrencias do carácter situado antes da chave. Por exemplo, "Ce{2,}" localiza "Cee", "Cercedo", "Cecebre", etc.

{1,2}

Define o número mínimo de ocorrencias do carácter situado antes da chave. Por exemplo, "Ce{2,}" localiza "Cee", "Cercedo", "Cecebre", etc.

{1,}

Define o número mínimo de ocorrencias do carácter situado antes da chave. Por exemplo, "Ce{2,}" localiza "Cee", "Cercedo", "Cecebre", etc.

( )

In the Find box:

Defines the characters inside the parentheses as a reference. You can then refer to the first reference in the current expression with "\1", to the second reference with "\2", and so on.

For example, if your text contains the number 13487889 and you search using the regular expression (8)7\1\1, "8788" is found.

You can also use () to group terms, for example, "a(bc)?d" finds "ad" or "abcd".

In the Replace box:

Use $ (dollar) instead of \ (backslash) to replace references. Use $0 to replace the whole found string.

[:alpha:]

Represents an alphabetic character. Use [:alpha:]+ to find one of them.

[:digit:]

Represents a decimal digit. Use [:digit:]+ to find one of them.

[:alnum:]

Representa un carácter alfanumérico ([:alpha:] e [:digit:]).

[:space:]

Representa un carácter de espazo (pero non outros caracteres en branco).

[:print:]

Representa un carácter imprimíbel.

[:cntrl:]

Representa un carácter non-imprimíbel.

[:lower:]

Representa un carácter minúsculo, se caso Xogo é seleccionado en Opcións .

[:upper:]

Represents an uppercase character if Match case is selected in Options.


For a full list of supported metacharacters and syntax, see ICU Regular Expressions documentation

Exemplos

e([:digit:])? -- finds 'e' followed by zero or one digit. Note that currently all named character classes like [:digit:] must be enclosed in parentheses.

^([:digit:])$ -- finds lines or cells with exactly one digit.

Podes combinar os termos de busca para formar investigacións complexas.

Para atopar números de tres díxitos por si só nun parágrafo

^[:digit:]{3}$

^ Significa que o xogo ten que ser, no inicio dun parágrafo

[: Introduza:] corresponde a calquera díxito decimal,

{3} means there must be exactly 3 copies of "digit",

$ Significa que o xogo debe rematar un parágrafo.

Precisamos da súa axuda!