#include <iostream>
#include <boost/algorithm/string.hpp>
using namespace std;
int main()
{
cout << "Enter a string:\n";
string array_1;
getline(cin, array_1);
cout << "Enter a string you want to find:\n";
string ch;
getline(cin, ch);
cout << "Enter a string you wish to replace " << ch << " with:\n";
string ch2;
cin >> ch2;
boost::replace_all(array_1, ch, ch2);
cout << "Here is the new string: " << array_1 << '\n';
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Ym9vc3QvYWxnb3JpdGhtL3N0cmluZy5ocHA+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CmludCBtYWluKCkKewogICAgY291dCA8PCAiRW50ZXIgYSBzdHJpbmc6XG4iOwogICAgc3RyaW5nIGFycmF5XzE7CiAgICBnZXRsaW5lKGNpbiwgYXJyYXlfMSk7CgogICAgY291dCA8PCAiRW50ZXIgYSBzdHJpbmcgeW91IHdhbnQgdG8gZmluZDpcbiI7CiAgICBzdHJpbmcgY2g7CiAgICBnZXRsaW5lKGNpbiwgY2gpOwoKICAgIGNvdXQgPDwgIkVudGVyIGEgc3RyaW5nIHlvdSB3aXNoIHRvIHJlcGxhY2UgIiA8PCBjaCA8PCAiIHdpdGg6XG4iOwogICAgc3RyaW5nIGNoMjsKICAgIGNpbiA+PiBjaDI7CgogICAgYm9vc3Q6OnJlcGxhY2VfYWxsKGFycmF5XzEsIGNoLCBjaDIpOwoKICAgIGNvdXQgPDwgIkhlcmUgaXMgdGhlIG5ldyBzdHJpbmc6ICIgPDwgYXJyYXlfMSA8PCAnXG4nOwp9Cg==