我一直在想出一种方法来解决我正在通过PCAP文件搜索的情况。在HTTP OK响应之后,我正在寻找标题“Content-Type:。*”。然而,在这样一个例子:正则表达式跳过类似的结果
HTTP/1.1 200 OK
date:
asdf
X-Content-Type: aadsf
Content-Type: application/json
more: stuff
HTTP/1.1 200 OK
date:
asdf
X-Content-Type: aadsf
Content-Type: application/json
more: stuff
我现在的正则表达式"HTTP\/1.1 200 OK[\s\S]*?Content-Type:.*"
在X-Content-Type: aadsf
停止捕获组。我的意图是正则表达式捕获组去Content-Type: application/json
。
任何正则表达式向导,可以给我一些指针?
您在这里使用哪种语言? – Jan