The case-insensitive hassuffix string operator
Learn how to use the hassuffix operator to filter data with a case-insensitive suffix string.
Filters a record set for data with a case-insensitive ending string. hassuffix returns true if there is a term inside the filtered string column ending with the specified string expression.
Performance tips
When possible, use the case-sensitive hassuffix_cs.
Syntax
T | where Column hassuffix (Expression)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| T | string | The tabular input whose records are to be filtered. | |
| Column | string | The column by which to filter. | |
| Expression | scalar | The scalar or literal expression for which to search. |
Returns
Rows in T for which the predicate is true.
Example
StormEvents
| summarize event_count=count() by State
| where State hassuffix "th"
| project State, event_count
Output
| State | event_count |
|---|---|
| NORTH CAROLINA | 1721 |
| SOUTH DAKOTA | 1567 |
| SOUTH CAROLINA | 915 |
| NORTH DAKOTA | 905 |
| ATLANTIC SOUTH | 193 |
| ATLANTIC NORTH | 188 |
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.