From d31bdd959720cacd67fcbc97327fa44046aac4bb Mon Sep 17 00:00:00 2001 From: Tindy X <49061470+tindy2013@users.noreply.github.com> Date: Sat, 21 Dec 2019 11:15:01 +0800 Subject: [PATCH] Fix a bug in regex wrapper --- misc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc.cpp b/misc.cpp index 86a808c..5e73613 100644 --- a/misc.cpp +++ b/misc.cpp @@ -537,7 +537,7 @@ std::string regReplace(std::string src, std::string match, std::string rep) if(rep.find("$") != rep.npos) rep = replace_all_distinct(rep, "$", "\\"); pcrecpp::RE reg(match); - if(reg.Replace(rep, &result)) + if(reg.GlobalReplace(rep, &result)) return result; else return src;