From: Hoà Viêt Dinh Date: Fri, 11 Oct 2002 13:20:57 +0000 (+0000) Subject: finally solved the bug of matcher - regexp didn't work when '\' was in the string X-Git-Tag: w0-1~153 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=9dd6bedd9fc0162154fc6068f64b5c2fd5eb8d37 finally solved the bug of matcher - regexp didn't work when '\' was in the string --- diff --git a/src/matcher.c b/src/matcher.c index 063929eb8..a348a0eaa 100644 --- a/src/matcher.c +++ b/src/matcher.c @@ -274,7 +274,8 @@ static gboolean matcherprop_string_match(MatcherProp * prop, gchar * str) if (!prop->preg && (prop->error == 0)) { prop->preg = g_new0(regex_t, 1); /* if regexp then don't use the escaped string */ - if (regcomp(prop->preg, prop->expr, + printf("%s\n", prop->expr); + if (regcomp(prop->preg, prop->unesc_expr, REG_NOSUB | REG_EXTENDED | ((prop->matchtype == MATCHTYPE_REGEXPCASE) ? REG_ICASE : 0)) != 0) {