The string should contain:
200 then GET then (text/html or text/plain)
.*(\/200)+.*(GET)+.*(text\/html|text\/plain)
This is working, and I want to add one more condition. The string should NOT contain TEST.
How should I add that condition?
Simplified your regex a bit to:
Which I I fairly sure still fulfills your requirements (I think
(term)+.*is equivalent toterm.*, please correct me if I’m wrong in my thinking on this).So you can do what you want using a negative lookahead: