Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Regex 在灰色日志中搜索带破折号和数字的字符串?_Regex_<img Src="//i.stack.imgur.com/RUiNP.png" Height="16" Width="18" Alt="" Class="sponsor Tag Img">elasticsearch_Graylog2 - Fatal编程技术网 elasticsearch,graylog2,Regex,elasticsearch,Graylog2" /> elasticsearch,graylog2,Regex,elasticsearch,Graylog2" />

Regex 在灰色日志中搜索带破折号和数字的字符串?

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

我在查找正确的查询语法以在我的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/.+/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
请参阅。

请参阅