diff options
Diffstat (limited to 'src/libregexp/test2.c')
-rw-r--r-- | src/libregexp/test2.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/libregexp/test2.c b/src/libregexp/test2.c new file mode 100644 index 00000000..150953e4 --- /dev/null +++ b/src/libregexp/test2.c @@ -0,0 +1,20 @@ +#include "lib9.h" +#include <regexp9.h> + + +main(int ac, char **av) +{ + Resub rs[10]; + Reprog *p; + char *s; + int i; + + p = regcomp("[^a-z]"); + s = "\n"; + if(regexec(p, s, rs, 10)) + print("%s %lux %lux %lux\n", s, s, rs[0].sp, rs[0].ep); + s = "0"; + if(regexec(p, s, rs, 10)) + print("%s %lux %lux %lux\n", s, s, rs[0].sp, rs[0].ep); + exit(0); +} |