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

Naudojant funkcijas, kuriose vienas ar keli argumentai yra paieškos kriterijų eilutės, kurios reiškia įprastą reiškinį, pirmiausia bandoma eilutės kriterijus paversti skaičiais. Pavyzdžiui, „.0“ į 0,0 ir pan. Jei pasiseks, atitiktys bus ne reguliarieji reiškiniai, o skaitiniai. Tačiau pereinant prie lokalės, kur trupmenos skirtukas nėra taškas, reguliariųjų reiškinių konvertavimas veiks. Jei norite, kad būtų įvertinamas įprastas reiškinys, o ne skaitinis, naudokite tokį reiškinį, kurio negalima klaidingai perskaityti kaip skaitinį, pvz., „.0]“ arba „.\0“ arba „(?i).0“.


Sintaksė

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.

Pavyzdys

=SEARCH(54;998877665544) returns 10.

Paremkite mus!