From c28d940234eb74c19d00fbb0ba2c6803150f353a Mon Sep 17 00:00:00 2001 From: Marco Pracucci Date: Fri, 29 Sep 2023 12:48:55 +0200 Subject: [PATCH] Improved regexp matcher in TestAnalyzeRealQueries Signed-off-by: Marco Pracucci --- model/labels/regexp_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/labels/regexp_test.go b/model/labels/regexp_test.go index 48940ce252..3396b9da79 100644 --- a/model/labels/regexp_test.go +++ b/model/labels/regexp_test.go @@ -665,7 +665,7 @@ func TestAnalyzeRealQueries(t *testing.T) { queryStartTimes []time.Time } - labelValueRE := regexp.MustCompile(`=~\\"([^"]+)\\"`) + labelValueRE := regexp.MustCompile(`=~(?:\\"|')([^"']*)(?:\\"|')`) tsRE := regexp.MustCompile(`ts=([^ ]+)`) shardedQueriesRE := regexp.MustCompile(`sharded_queries=(\d+)`) splitQueriesRE := regexp.MustCompile(`split_queries=(\d+)`)