Berserk Docs
Scalar FunctionsString Functions

String Operators

Infix string operators for filtering and matching

String operators test strings using infix notation. Most operators have a case-sensitive variant (suffixed with _cs).

OperatorDescriptionCase-SensitiveExample
containsIndicate whether a string contains another string (case-insensitive).No"value" contains "test"
!containsNegation of containsNo
contains_csIndicate whether a string contains another string (case-sensitive).Yes"value" contains_cs "test"
!contains_csNegation of contains_csYes
endswithIndicate whether a string ends with another string (case-insensitive).No"value" endswith "test"
!endswithNegation of endswithNo
endswith_csIndicate whether a string ends with another string (case-sensitive).Yes"value" endswith_cs "test"
!endswith_csNegation of endswith_csYes
hasIndicate whether a string contains a whole word (case-insensitive, word boundary matching).No"value" has "test"
!hasNegation of hasNo
has_csIndicate whether a string contains a whole word (case-sensitive, word boundary matching).Yes"value" has_cs "test"
!has_csNegation of has_csYes
hasprefixIndicate whether a string starts with a word prefix (case-insensitive, word boundary matching).No"value" hasprefix "test"
!hasprefixNegation of hasprefixNo
hasprefix_csIndicate whether a string starts with a word prefix (case-sensitive, word boundary matching).Yes"value" hasprefix_cs "test"
!hasprefix_csNegation of hasprefix_csYes
hassuffixIndicate whether a string ends with a word suffix (case-insensitive, word boundary matching).No"value" hassuffix "test"
!hassuffixNegation of hassuffixNo
hassuffix_csIndicate whether a string ends with a word suffix (case-sensitive, word boundary matching).Yes"value" hassuffix_cs "test"
!hassuffix_csNegation of hassuffix_csYes
matches regexReturns true if the string matches the regular expression pattern.No"value" matches regex "test"
startswithIndicate whether a string starts with another string (case-insensitive).No"value" startswith "test"
!startswithNegation of startswithNo
startswith_csIndicate whether a string starts with another string (case-sensitive).Yes"value" startswith_cs "test"
!startswith_csNegation of startswith_csYes

Function call syntax

Most string operators can also be called as functions (except multi-word operators like matches regex). For example:

T | where contains(name, "search")

is equivalent to:

T | where name contains "search"

On this page