Splunk正则表达式以匹配部分URL字符串

问题描述 投票:0回答:2

我正在尝试使用Splunk搜索特定url的所有基本路径实例(并可能随后将其绘制在图表上。)>

以下是一些示例网址和我要匹配的部分:

http://some-url.com/first/  # match "first"
http://some-url.com/first/second/ # match "first"
http://some-url.com/first/second/third/  # match "first"

这是我正在使用的正则表达式,可以正常工作:

http:\/\/some-url\.com\/(.*?)\/

我的Splunk搜索应该是什么才能提取所需的文本?在Splunk中甚至有可能吗?

我正在尝试使用Splunk搜索特定url的所有基本路径实例(并可能在之后将其绘制在图表上)。以下是一些示例网址和我要匹配的部分:http:// some -...

regex splunk
2个回答
0
投票

假设它始终为com


0
投票

要匹配任何URL(是否匹配.com),可以使用以下命令。

© www.soinside.com 2019 - 2024. All rights reserved.