#include <iostream>
#include <regex>
#include <string>

int main() {

    std::vector<std::string> text = {
        "Hello ! What the foundation will do is...",
        "Hello! What a talented foundation will do is...",
        "water, take, food",
        "what you take for",
        "Well! The food is not good!"
    };

    auto wtf_ex = std::regex{R"(\b[wW]+[\w]*[\W]+[tT]+[\w]*[\W]+[fF]+[\w]*)"};


    for (const auto& unmodified : text) {
        auto modified = 
            std::regex_replace(unmodified, wtf_ex, "WTF");

        std::cout << "\n\nUnmodified: " << unmodified;
        std::cout << "\nModified:   " << modified;
    }
}