mirror of
https://github.com/MetaCubeX/subconverter.git
synced 2025-11-04 18:19:42 +08:00
Fix a bug in regex wrapper
This commit is contained in:
parent
97a1a123ba
commit
d31bdd9597
2
misc.cpp
2
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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user