#include <stdio.h>#include <stdlib.h>#include <cupl.h>Go to the source code of this file.
Functions | |
| int | main (int argc, char **argv) |
|
||||||||||||
|
Definition at line 5 of file regex-sample.c. References cupl_match_regex(). 00005 {
00006 if (argc < 3) {
00007 fprintf(stderr, "Usage: %s string pattern\n", argv[0]);
00008 fprintf(stderr, " %s \"Some girls are walking\" \"^[Ssome]\"\n", argv[0]);
00009 return 0;
00010 }
00011
00012 if (cupl_match_regex(argv[1], argv[2]) == 1)
00013 printf("String \"%s\" matched the pattern \"%s\".\n", argv[1], argv[2]);
00014 else
00015 printf("String \"%s\" didn't match the pattern \"%s\".\n", argv[1], argv[2]);
00016
00017 return 1;
00018 }
|
1.3.9.1