grok匹配模式的常用正则表达式 [英] Common regular expression for grok matching pattern
本文介绍了grok匹配模式的常用正则表达式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要通用的 RE 来表示以下值
I need the common RE for representing the below values
Invoice_IID: 00000000-4164-1638-e168-ffff08d24460
Invoice_IID 00000000-4164-1638-e168-ffff08d24460
invoice iid 00000000-4164-1638-074f-ffff08d24461
<invoice iid="00000000-4164-1638-074f-ffff08d24461"
<invoice iid=\"00000000-4164-1638-074f-ffff08d24461\"
<parent_invoice iid="00000000-4164-1638-074f-ffff08d24461"
我正在使用下面的grok调试器尝试以下配置
I am trying with the below configuration with my grok debugger like
http://grokconstructor.appspot.com/do/match#result
grok {
match => { "msg" => "[iI]no*voice[_,\" \"][iI][iI][dD]:? %{UUID:InvoiceIID}" }
}
我需要在一种正则表达式
推荐答案
是的,对于上述所有类型的数据,我都知道了解决方案.
Yes, I got the solution for all above types of data.
匹配模式为:
grok {
match => { "msg" => "[<]*[parent_]*[<]*[iI]no*voice[_,\" \"][iI][iI][dD][" "]*:?[" "]*=?[\\,\"]*%{UUID:InvoiceIID}[\",\\]*" }
}
这篇关于grok匹配模式的常用正则表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文