Home / Search/ Language Reference/ Operators/ String Operators/contains

contains

The contains operator applies a case-insensitive string filter and returns events that match.

The following table compares the contains operators using these abbreviations:

  • RHS = right-hand side of the expression
  • LHS = left-hand side of the expression
OperatorDescriptionCase-SensitiveExample (yields true)
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"

Syntax

    Scope | where Field contains String

Arguments

  • Scope: The input tabular result set to filter.
  • Field: The field to filter.
  • String: The string used to filter.

Example

dataset=myDataset 
| summarize event_count=count() by State
| where State contains "enn"