new upstream release (3.3.0); modify package compatibility for Stretch
[ossec-hids.git] / src / os_regex / examples / match.c
1 /* Copyright by Daniel B. Cid (2005)
2  * Under the public domain. It is just an example.
3  * Some examples of the usage for the os_regex library.
4  */
5
6 #include <stdio.h>
7 #include <string.h>
8 #include <stdlib.h>
9
10 #include "os_regex.h"
11
12
13 int main(int argc, char **argv)
14 {
15     if (argc != 3) {
16         printf("%s regex word\n", argv[0]);
17         exit(1);
18     }
19
20     printf("for MATCH: ");
21     if (OS_Match2(argv[1], argv[2])) {
22         printf("TRUE\n");
23     } else {
24         printf("FALSE\n");
25     }
26
27     return (0);
28 }
29