Regex 在灰色日志中搜索带破折号和数字的字符串?
我在查找正确的查询语法以在我的graylog消息中搜索以下字符串时遇到问题: 示例字符串:Regex 在灰色日志中搜索带破折号和数字的字符串?,regex,
elasticsearch,graylog2,Regex,
elasticsearch,Graylog2,我在查找正确的查询语法以在我的graylog消息中搜索以下字符串时遇到问题: 示例字符串: /path-one/12/status /path-one/18/status /path-one/103/status /path-one/9821/status 它们位于request\u url字段中 我尝试了以下方法: request_url:"/path\-one/.+/status" => Returns No results request_url:/path-one/.+/stat
/path-one/12/status
/path-one/18/status
/path-one/103/status
/path-one/9821/status
它们位于request\u url
字段中
我尝试了以下方法:
request_url:"/path\-one/.+/status" => Returns No results
request_url:/path-one/.+/status => Malformed in the following location and points to "/path-one/"
request_url:/path\-one/.+/status => Malformed in the following location and points to "/path\-one/"
request_url:/path-one/[0-9]+/status => Malformed in the following location and points to "[0-9]"
在中间部分可以是正数的情况下,查找所需字符串的正确语法是什么?您可以试试
\/path-one\/[0-9]+\/status
请参阅。请参阅