Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

^|$ not handled correctly with REG_NOTBOL #101

Open
mohd-akram opened this issue May 21, 2024 · 0 comments
Open

^|$ not handled correctly with REG_NOTBOL #101

mohd-akram opened this issue May 21, 2024 · 0 comments

Comments

@mohd-akram
Copy link

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).

dag-erling added a commit to dag-erling/tre that referenced this issue May 24, 2024
dag-erling added a commit to dag-erling/tre that referenced this issue May 24, 2024
dag-erling added a commit to dag-erling/tre that referenced this issue Jul 25, 2024
dag-erling added a commit to dag-erling/tre that referenced this issue Jul 25, 2024
dag-erling added a commit to dag-erling/tre that referenced this issue Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant