+ regex = "^a";
+ SILC_LOG_DEBUG(("Regex %s", regex));
+ if (!silc_regex_compile(®, regex, 0))
+ goto err;
+
+ string = "a";
+ SILC_LOG_DEBUG(("Test NOTBOL flag", string));
+ if (silc_regex_match(®, string, strlen(string), 0, NULL,
+ SILC_REGEX_NOTBOL))
+ goto err;
+ if (silc_errno != SILC_ERR_NOT_FOUND)
+ goto err;
+ SILC_LOG_DEBUG(("Did not match (OK)"));
+
+ silc_regex_free(®);
+
+ regex = "a$";
+ SILC_LOG_DEBUG(("Regex %s", regex));
+ if (!silc_regex_compile(®, regex, 0))
+ goto err;
+
+ string = "a";
+ SILC_LOG_DEBUG(("Test NOTEOL flag", string));
+ if (silc_regex_match(®, string, strlen(string), 0, NULL,
+ SILC_REGEX_NOTEOL))
+ goto err;
+ if (silc_errno != SILC_ERR_NOT_FOUND)
+ goto err;
+ SILC_LOG_DEBUG(("Did not match (OK)"));
+
+ silc_regex_free(®);
+