On This Page

Home / Search/ Language Reference/ Operators/String Operators

String Operators

A list of string operators supported by Cribl Search.


String operators manipulate and transform text, enabling actions like concatenation, trimming, replacement, or extraction.

Note that these operators’ support, and their case-sensitivity, vary depending on their parent search operators and filter operators. For exact details, see these pages:

We use the following abbreviations in the table below:

  • Operators with a _cs suffix are case-sensitive.
  • RHS = right-hand side of the expression.
  • LHS = left-hand side of the expression.
OperatorDescriptionCase-SensitiveExample (yields true)
==EqualsYes"aBc" == "aBc"
!=Not equalsYes"abc" != "ABC"
=~EqualsNo"abc" =~ "ABC"
!~Not equalsNo"aBc" !~ "xyz"
containsRHS occurs as a subsequence of LHSNo"FabriKam" contains "BRik"
!containsRHS doesn’t occur in LHSNo"Fabrikam" !contains "xyz"
contains_csRHS occurs as a subsequence of LHSYes"FabriKam" contains_cs "Kam"
!contains_csRHS doesn’t occur in LHSYes"Fabrikam" !contains_cs "Kam"
endswithRHS is a closing subsequence of LHSNo"Fabrikam" endswith "Kam"
!endswithRHS isn’t a closing subsequence of LHSNo"Fabrikam" !endswith "brik"
endswith_csRHS is a closing subsequence of LHSYes"Fabrikam" endswith_cs "kam"
!endswith_csRHS isn’t a closing subsequence of LHSYes"Fabrikam" !endswith_cs "brik"
hasRight-hand-side (RHS) is a whole term in left-hand-side (LHS)No"North America" has "america"
!hasRHS isn’t a full term in LHSNo"North America" !has "amer"
has_allSame as has but works on all of the eventsNo"North and South America" has_all("south", "north")
!has_allNot all of the RHS terms are present in LHSNo"North and South America" !has_all("south", "east")
has_anySame as has but works on any of the eventsNo"North America" has_any("south", "north")
!has_anyNone of the RHS terms are present in LHSNo"North and South America" !has_any("east", "west")
has_csRHS is a whole term in LHSYes"North America" has_cs "America"
!has_csRHS isn’t a full term in LHSYes"North America" !has_cs "amer"
hasprefixRHS is a term prefix in LHSNo"North America" hasprefix "ame"
!hasprefixRHS isn’t a term prefix in LHSNo"North America" !hasprefix "mer"
hasprefix_csRHS is a term prefix in LHSYes"North America" hasprefix_cs "Ame"
!hasprefix_csRHS isn’t a term prefix in LHSYes"North America" !hasprefix_cs "CA"
hassuffixRHS is a term suffix in LHSNo"North America" hassuffix "ica"
!hassuffixRHS isn’t a term suffix in LHSNo"North America" !hassuffix "americ"
hassuffix_csRHS is a term suffix in LHSYes"North America" hassuffix_cs "ica"
!hassuffix_csRHS isn’t a term suffix in LHSYes"North America" !hassuffix_cs "icA"
inEqual to any of the eventsYes"abc" in ("123", "345", "abc")
!inNot equal to any of the eventsYes"bca" !in ("123", "345", "abc")
in~Equal to any of the eventsNo"Abc" in~ ("123", "345", "abc")
!in~Not equal to any of the eventsNo"bCa" !in~ ("123", "345", "ABC")
matches regexLHS contains a match for RHSYes"Fabrikam" matches regex "b.*k"
startswithRHS is an initial subsequence of LHSNo"Fabrikam" startswith "fab"
!startswithRHS isn’t an initial subsequence of LHSNo"Fabrikam" !startswith "kam"
startswith_csRHS is an initial subsequence of LHSYes"Fabrikam" startswith_cs "Fab"
!startswith_csRHS isn’t an initial subsequence of LHSYes"Fabrikam" !startswith_cs "fab"