SEARCH

Returns the position of a text segment within a character string. You can set the start of the search as an option. The search text can be a number or any sequence of characters. The search is not case-sensitive. If the text is not found, returns error 519 (#VALUE).

The search supports wildcards or regular expressions. With regular expressions enabled, you can enter "all.*", for example to find the first location of "all" followed by any characters. If you want to search for a text that is also a regular expression, you must either precede every regular expression metacharacter or operator with a "\" character, or enclose the text into \Q...\E. You can switch the automatic evaluation of wildcards or regular expression on and off in - LibreOffice Calc - Calculate.

warning

Ao usar funções onde um ou mais argumentos são textos que representem uma expressão regular, a primeira tentativa é de converter o texto do critério em número. Por exemplo, ".0" se converterá em 0.0 e assim por diante. Se tiver sucesso, a verificação não será por expressão regular, mas por conversão numérica. Contudo, se mudar de configuração regional e o separador decimal não for o ponto, a expressão regular será utilizada. Para forçar a avaliação da expressão regular em vez de uma expressão numérica, utilize uma expressão que não possa ser confundida com um número como, por exemplo, .[0]" ou ".\0" or mesmo "(?i).0".


Sintaxe

SEARCH("FindText"; "Text" [; Position])

FindText is the text to be searched for.

Text is the text where the search will take place.

Position (optional) is the position in the text where the search is to start.

Exemplo

=SEARCH(54;998877665544) returns 10.

Necessitamos da sua ajuda!