You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure Sentinel Kusto:如何实现正则表达式不匹配筛选?

在Kusto中排除匹配正则表达式的结果

解决方案

直接用not关键字对matches regex的结果取反即可,不需要专门的!matches regex操作符。

修改后的查询示例

| summarize event_count() by State
| where not (State matches regex "K.*S")  // 排除匹配指定正则的State
| where event_count > 10
| project State, event_count

说明

这个查询会筛选出**State不匹配正则"K.*S"**且事件数大于10的结果,完全实现你需要的反向逻辑。不管正则表达式有多复杂,这种方式都能精准排除匹配项,比!contains或!has更适配复杂规则的过滤需求。

内容的提问来源于stack exchange,提问作者zleblond

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.14 08:15:35