From 50cdaa790635d29ad7a607d008c9a443fd25757f Mon Sep 17 00:00:00 2001 From: Florian Pommerening Date: Thu, 5 Oct 2023 16:32:10 +0200 Subject: [PATCH] force match to start at start of text while parsing --- src/search/parser/lexical_analyzer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search/parser/lexical_analyzer.cc b/src/search/parser/lexical_analyzer.cc index a127aed9b7..9a37360809 100644 --- a/src/search/parser/lexical_analyzer.cc +++ b/src/search/parser/lexical_analyzer.cc @@ -58,7 +58,7 @@ TokenStream split_tokens(const string &text) { for (const auto &type_and_expression : token_type_expressions) { TokenType token_type = type_and_expression.first; const regex &expression = type_and_expression.second; - if (regex_search(start, end, match, expression)) { + if (regex_search(start, end, match, expression, regex_constants::match_continuous)) { tokens.push_back({utils::tolower(match[1]), token_type}); start += match[0].length(); has_match = true;