Skip to content
Discussion options

You must be logged in to vote

The main reason is you trying to find it in the agent part (3rd group enclosed in quotes), so [^"]*"[^"]*" \d+ \S+ "[^"]*" would bypass the "URI-part", response code (\d), size, "referrer" and then search for %(wpblock)s inside the "agent"...

Try something like this:

- failregex = ^(?:\[[^\]]*\] )?<ADDR> [^"]*"[^"]*" \d+ \S+ "[^"]*" "[^"]*(?:%(others)s|%(wpblock)s)[^"]*"$
+ failregex = ^(?:\[[^\]]*\] )?<ADDR> [^"]*"[^"]*(?:%(others)s|%(wpblock)s)[^"]*" (?!200)

([^"]* - bypass anything but not "-char, then match "-char (open quote for method+URI-part), then again anything but not ", then the string matching others or wpblock ...)

However it still looks a bit ugly too me (the part (?:%(othe…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by sebres
Comment options

You must be logged in to vote
1 reply
@sebres
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants