INDEX

Syntax

INDEX(<string>;<string with regex>)

Description

Finds the first occurrence of the given regular expression or -1 if not found.

Datameer tries to match entire record without automatically adding ^ or $ to the regular expression. If the record has multiple lines, then this must be accounted for with (?s) or line terminators. 

Examples

Column1RegexINDEX returns
Hello HannesH[^e]6
Hello HannesH[^ae]-1
Hello HannesH[^el]6


=INDEX("Hello Hannes"; "H[^e]") returns integer value 6
=INDEX("Hello Hannes"; "H[^ae]") returns integer value -1