I am trying to use regex3 lib for parsing the file in C using following program.
#include <sys/types.h>
#include <regex.h>
#include <stdio.h>
int main(int argc, char **argv) {
int r;
regex_t reg;
++argv; /* Danger! */
if (r = regcomp(®, *argv, REG_NOSUB|REG_EXTENDED)) {
char errbuf[1024];
regerror(r, ®, errbuf, sizeof(errbuf));
printf("error: %s\n", errbuf);
return 1;
}
for (++argv; *argv; ++argv) {
if (regexec(®, *argv, 0, NULL, 0) == REG_NOMATCH)
continue;
printf("matched: %s\n", *argv);
}
return 0;
}
regex3.h no such file or directory.What is the reason for this?