1 /* Copyright (C) 2009 Trend Micro Inc.
4 * This program is a free software; you can redistribute it
5 * and/or modify it under the terms of the GNU General Public
6 * License (version 2) as published by the FSF - Free Software
16 /* Compile a POSIX regex, returning NULL on error
17 * Returns 1 if matches, 0 if not
19 int OS_PRegex(const char *str, const char *regex)
27 if (regcomp(&preg, regex, REG_EXTENDED | REG_NOSUB) != 0) {
28 merror("%s: Posix Regex compile error (%s).", __local_name, regex);
32 if (regexec(&preg, str, strlen(str), NULL, 0) != 0) {