Imported Upstream version 2.7
[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 #include "os_regex.h"
10
11 int main(int argc,char **argv)
12 {
13
14     if(argc != 3)
15     {
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     return(0);
27 }
28 /* EOF */