The case-insensitive contains string operator
Learn how to use the contains operator to filter a record set for data containing a case-insensitive string.
Filters a record set for data containing a case-insensitive string. contains
searches for arbitrary sub-strings rather than terms.
Performance tips
When possible, use contains_cs - a case-sensitive version of the operator.
If you’re looking for a term, use has
for faster results.
Syntax
T |
where
col contains_cs
(
string)
Parameters
Name | Type | Required | Description |
---|---|---|---|
T | string | ✔️ | The tabular input whose records are to be filtered. |
col | string | ✔️ | The name of the column to check for string. |
string | string | ✔️ | The case-sensitive string by which to filter the data. |
Returns
Rows in T for which string is in col.
Example
StormEvents
| summarize event_count=count() by State
| where State contains "enn"
| where event_count > 10
| project State, event_count
| render table
Output
State | event_count |
---|---|
PENNSYLVANIA | 1687 |
TENNESSEE | 1125 |
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.