INDEX
Syntax
INDEX(<string>;<string with regex>)
Description
Finds the first occurrence of the given regular expression or -1 if not found.
Datameer X tries to match the 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
Column1 | Regex | INDEX returns |
---|---|---|
Hello Hannes | H[^e] | 6 |
Hello Hannes | H[^ae] | -1 |
Hello Hannes | H[^el] | 6 |
=INDEX("Hello Hannes"; "H[^e]") returns integer value 6 =INDEX("Hello Hannes"; "H[^ae]") returns integer value -1