From eb30b842f4ee4d68f68d8a6ba17e0109b6777565 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sun, 23 Nov 2008 19:07:10 +0100 Subject: [PATCH] regex match: Require *all* regular expressions to match. Before, when there were multiple regular expressions for the same field, for example the host, only of of those regular expressions needed to match for a successful overall match. The new behavior is not that *all* regular expressions need to match for a successful overall match. This makes the behavior much easier to understand. --- src/match_regex.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/match_regex.c b/src/match_regex.c index 15f3c774..9233d803 100644 --- a/src/match_regex.c +++ b/src/match_regex.c @@ -109,17 +109,17 @@ static int mr_match_regexen (mr_regex_t *re_head, /* {{{ */ { DEBUG ("regex match: Regular expression `%s' matches `%s'.", re->re_str, string); - return (FC_MATCH_MATCHES); } else { DEBUG ("regex match: Regular expression `%s' does not match `%s'.", re->re_str, string); + return (FC_MATCH_NO_MATCH); } } - return (FC_MATCH_NO_MATCH); + return (FC_MATCH_MATCHES); } /* }}} int mr_match_regexen */ static int mr_config_add_regex (mr_regex_t **re_head, /* {{{ */ -- 2.11.0