^|$ not handled correctly with REG_NOTBOL
mohd-akram opened this issue · 0 comments
mohd-akram commented
The following:
#include <stdio.h>
#include <tre/tre.h>
int main(void)
{
regex_t preg;
tre_regcomp(&preg, "^|$", REG_EXTENDED);
regmatch_t pmatch[1];
printf("%d\n", tre_regexec(&preg, "", 1, pmatch, REG_NOTBOL));
return 0;
}
prints 1. It should print 0 (this is the case in FreeBSD libc and Linux libc).