finally solved the bug of matcher - regexp didn't work when '\' was in the string
authorHoà Viêt Dinh <dinh.viet.hoa@free.fr>
Fri, 11 Oct 2002 13:20:57 +0000 (13:20 +0000)
committerHoà Viêt Dinh <dinh.viet.hoa@free.fr>
Fri, 11 Oct 2002 13:20:57 +0000 (13:20 +0000)
src/matcher.c

index 063929e..a348a0e 100644 (file)
@@ -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) {