I am trying to find a way to solve the situation when I look at PCAP files. I am looking for the header "Content-Type :. *" After an HTTP OK response. However, in the following example:
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
The current current regular expression "HTTP\/1.1 200 OK[\s\S]*?Content-Type:.*"
stops the capture group at X-Content-Type: aadsf
. My goal is a regex capture group to go to Content-Type: application/json
.
Any regex masters that can give me some pointers?
source
share