From 19e2b9bc23e71ccafdd754686d4881058b8a1fb5 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 19 Mar 2026 16:37:19 +0100 Subject: Allow filtering on an empty match --- src/work.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/work.c b/src/work.c index 2ae55a2..7013726 100644 --- a/src/work.c +++ b/src/work.c @@ -195,8 +195,7 @@ DEFINE_OPERATOR(g) { pcre2_match_data *md = pcre2_match_data_create_from_pattern(ops[opi].re, nullptr); - int n = pcre2_jit_match(ops[opi].re, sv.p, sv.len, 0, PCRE2_NOTEMPTY, - md, nullptr); + int n = pcre2_jit_match(ops[opi].re, sv.p, sv.len, 0, 0, md, nullptr); pcre2_match_data_free(md); if (n == PCRE2_ERROR_NOMATCH) @@ -211,8 +210,7 @@ DEFINE_OPERATOR(G) { pcre2_match_data *md = pcre2_match_data_create_from_pattern(ops[opi].re, nullptr); - int n = pcre2_jit_match(ops[opi].re, sv.p, sv.len, 0, PCRE2_NOTEMPTY, - md, nullptr); + int n = pcre2_jit_match(ops[opi].re, sv.p, sv.len, 0, 0, md, nullptr); pcre2_match_data_free(md); if (n == PCRE2_ERROR_NOMATCH) -- cgit v1.2.3