utils_match: Let '^' and '$' affect lines rather than the full string.
[collectd.git] / src / utils_match.c
index e4240ea..2aaeb96 100644 (file)
@@ -225,7 +225,7 @@ cu_match_t *match_create_callback (const char *regex,
     return (NULL);
   memset (obj, '\0', sizeof (cu_match_t));
 
-  status = regcomp (&obj->regex, regex, REG_EXTENDED);
+  status = regcomp (&obj->regex, regex, REG_EXTENDED | REG_NEWLINE);
   if (status != 0)
   {
     ERROR ("Compiling the regular expression \"%s\" failed.", regex);