search¶
Description¶
Return true if the for
text is matched in the input string in
(case-insensitive). All the for
arguments must individually match, but ordering between them doesn’t matter.
See also contains
Return type¶
bool
Domain¶
This is a scalar function (calculates a single output value for a single input row.)
Categories¶
Usage¶
search( in, for ... )
Argument |
Type |
Required |
Multiple |
---|---|---|---|
in |
string |
Required |
Only one |
for |
string |
Required |
Can be multiple |
Examples¶
filter search(log, "ERROR")
Pass through all observations where field log
contains the string ERROR
.
filter search("foo bar baz", "FOO B", "baz", "aR")
This will return true, because each of the sub-strings "FOO B"
, "baz"
and "aR"
match, ignoring case, and ignoring relative ordering. Note that the match "FOO B"
and "baz"
overlap each other.