#include "interface.h"
#include "checkqueue.h"
#include "kernel.h"
-#include <boost/algorithm/string/replace.hpp>
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
#include "main.h"
+#include <regex>
+
using namespace std;
using namespace boost;
std::string strCmd = GetArg("-blocknotify", "");
if (!fIsInitialDownload && !strCmd.empty())
- {
- boost::replace_all(strCmd, "%s", hashBestChain.GetHex());
- boost::thread t(runCommand, strCmd); // thread runs free
- }
+ // thread runs free
+ boost::thread t(runCommand, regex_replace(strCmd, static_cast<std::regex>("%s"), hashBestChain.GetHex()));
return true;
}