int main(void) {
char* mystring = "This is a foo line.";
char* pattern = "fo{2}";
mystring,
pattern,
"replaced",
0
);
if (!replaced) return EXIT_FAILURE;
printf("%s\n", replaced);
free(replaced);
mystring,
pattern,
REG_ICASE
);
if (!replaced) return EXIT_FAILURE;
printf("%s\n", replaced);
free(replaced);
mystring,
pattern,
" ",
),
0
);
if (!replaced) return EXIT_FAILURE;
printf("%s\n", replaced);
free(replaced);
char* mytemplate =
"This is REDuseful" NC "?";
mytemplate,
"RED",
0
);
if (!replaced) return EXIT_FAILURE;
printf("%s\n", replaced);
free(replaced);
return EXIT_SUCCESS;
}