-/* Match STR against POSIX regular expression REGEX by calling regexec. This uses
- * the REG_NEWLINE flag, meaning that . does not match a newline and $ and ^ are
- * relative to lines as well as the beginning and end of STR. */
-int match(const char *regex, const char *str);
+/*
+ * Match the string "str" against POSIX regex "regex" with regexec(), with
+ * REG_NEWLINE set (match_newline == TRUE) or not.
+ *
+ * REG_NEWLINE means two things:
+ * - the dot won't match a newline;
+ * - ^ and $ will match around \n in the input string (as well as the beginning
+ * and end of the input).
+ */
+
+int do_match(const char *regex, const char *str, gboolean match_newline);