Search Text | TEXT_SEARCH

Syntax

TEXT_SEARCH( [value], [search] )

Parameters

value
The TEXT value

search
The TEXT value to search for. It may also be a string representing a regular expression to search using a pattern.

Return Value

A NUMBER that is the position in the VALUE where SEARCH is found. The value -1 is returned if the search finds no matches.

Description

Search for the location of a TEXT or PATTERN in a TEXT.

Examples

TEXT_SEARCH() # returns -1
TEXT_SEARCH("text to search") # returns -1
TEXT_SEARCH("text to search", "") # returns -1
TEXT_SEARCH("text to search", "search") # returns 8
TEXT_SEARCH("text to search", "not found") # returns -1
TEXT_SEARCH("TEXT TO SEARCH", "/arch/") # returns -1
TEXT_SEARCH("TEXT TO SEARCH", "/arch/i") # returns 10