i am trying to build regular expression with the regex.h lib.
i checked my expression in https://regex101.com/ with the the input "00001206 ffffff00 00200800 00001044" and i checked it in python as well, both gave me the expected result. when i ran the code below in c (over unix) i got "no match" print. any one have any suggest?
regex_t regex;
int reti;
reti = regcomp(®ex, "([0-9a-fA-F]{8}( |$))+$", 0);
if (reti)
{
fprintf(stderr, "Could not compile regex\n");
exit(1);
}
reti = regexec(®ex, "00001206 ffffff00 00200800 00001044", 0, NULL, 0);
if (!reti)
{
printf("Match");
}
else if (reti == REG_NOMATCH) {
printf("No match bla bla\n");
}