// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+#include <regex>
+
#include "alert.h"
#include "checkpoints.h"
#include "db.h"
#include "ui_interface.h"
#include "checkqueue.h"
#include "kernel.h"
-#include <boost/algorithm/string/replace.hpp>
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
auto 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<regex>("%s"), hashBestChain.GetHex()));
return true;
}
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+#include <regex>
+
#include "txdb.h"
#include "wallet.h"
#include "walletdb.h"
#include "base58.h"
#include "kernel.h"
#include "coincontrol.h"
-#include <boost/algorithm/string/replace.hpp>
#include <openssl/bio.h>
#include "main.h"
// notify an external script when a wallet transaction comes in or is updated
auto strCmd = GetArg("-walletnotify", "");
- if ( !strCmd.empty())
- {
- boost::replace_all(strCmd, "%s", wtxIn.GetHash().GetHex());
- boost::thread t(runCommand, strCmd); // thread runs free
- }
+ if (!strCmd.empty())
+ // thread runs free
+ boost::thread t(runCommand, regex_replace(strCmd, static_cast<regex>("%s"), wtxIn.GetHash().GetHex()));
}
return true;