From a55b586df286b22fdcf6f7755c44728cd08b71e0 Mon Sep 17 00:00:00 2001 From: cathugger Date: Tue, 23 Jan 2018 15:45:06 +0000 Subject: [PATCH] make ^ implicit for regexes --- filters.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/filters.h b/filters.h index d7c7d71..e24947b 100644 --- a/filters.h +++ b/filters.h @@ -391,7 +391,8 @@ static void filters_add(const char *filter) int errornum; PCRE2_SIZE erroroffset; pcre2_code *re; - re = pcre2_compile((PCRE2_SPTR8)filter,PCRE2_ZERO_TERMINATED,0,&errornum,&erroroffset,0); + re = pcre2_compile((PCRE2_SPTR8)filter,PCRE2_ZERO_TERMINATED, + PCRE2_NO_UTF_CHECK | PCRE2_ANCHORED,&errornum,&erroroffset,0); if (!re) { PCRE2_UCHAR buffer[1024]; pcre2_get_error_message(errornum,buffer,sizeof(buffer));