diff options
Diffstat (limited to 'utils/testregexp.cc')
-rw-r--r-- | utils/testregexp.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/utils/testregexp.cc b/utils/testregexp.cc new file mode 100644 index 0000000..5949ec8 --- /dev/null +++ b/utils/testregexp.cc @@ -0,0 +1,17 @@ +#include <stdlib.h> +#include <stdio.h> +#include "RegExp.h" + + +main (int argc, char** argv) +{ + char* s = "toto"; + char* s1 = "tota toto"; + if (argc > 1) + s1 = argv[1]; + CcuRegExp re = s; + if (re.Compile ()) { + if (re.Match (s1)) + printf ("%s\n",s1); + } +} |