/* Copyright (c) 2001-2004 by SoftIntegration, Inc. All Rights Reserved */
/* This is an example of the function regcomp(regex_t*,const char*, int).  This
   function compiles the expression stored in pattern and places the result in 
   reg.  The funtion returns zero if successful, and a non negative number if
   an error has occured.
*/
#include <regex.h>

int main() {
    regex_t reg;        
    int  cflags, retval;
    char  *pattern;
    pattern = "abcd";
    cflags = REG_NEWLINE;
 
    retval = regcomp(&reg, pattern,cflags);
    printf("regcomp(&reg, pattern, cflags) = %d\n", retval);
    if(retval == 0)
	printf("Successful.\n");
    else
	printf("An error has occured.\n");
}

