Fix a bug in regex wrapper

This commit is contained in:
Tindy X committed 2019-12-21 11:15:01 +08:00
1 parent 97a1a123ba
commit d31bdd9597
1 file changed
+1 -1
+1 -1
View File
@@ -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;