From 0a0c2e10fc7d69ecefc6b793e34b8266f2bfddc2 Mon Sep 17 00:00:00 2001 From: ZhuangYumin Date: Thu, 14 Dec 2023 11:47:11 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86keyword=E7=BB=84?= =?UTF-8?q?=E7=9A=84=E5=8C=B9=E9=85=8D=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/lexer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/lexer.cpp b/backend/src/lexer.cpp index c470e02..ab05645 100644 --- a/backend/src/lexer.cpp +++ b/backend/src/lexer.cpp @@ -336,7 +336,7 @@ bool CommandModifyLexer(const std::string &command, std::string &ISBN, std::string &name, std::string &author, std::string &keyword, double &price) { static std::basic_regex main_pattern( - R"(^ *modify(?: +-ISBN=(?:[!-~]{1,20})| +-name=\"(?:[!#-~]{1,60})\"| +-author=\"(?:[!#-~]{1,60})\"| +-keyword=\"(?:[^\s"]{1,60})\"| +-price=[0-9]{1,10}(?:\.[0-9]+)?)+ *$)", + R"(^ *modify(?: +-ISBN=(?:[!-~]{1,20})| +-name=\"(?:[!#-~]{1,60})\"| +-author=\"(?:[!#-~]{1,60})\"| +-keyword=\"((?:[!#-{}~]{1,60}\|)*(?:[!#-{}~]{1,60}))\"| +-price=[0-9]{1,10}(?:\.[0-9]+)?)+ *$)", std::regex_constants::optimize); if (std::regex_match(command, main_pattern)) { std::stringstream ss(command);