#include #include int main() { std::regex const pattern { R"(\w)" }; std::cout << R"('\w' match with 'a': )" << std::boolalpha << std::regex_match("a", pattern) << std::endl; std::cout << R"('\w' match with '1': )" << std::boolalpha << std::regex_match("1", pattern) << std::endl; std::cout << R"('\w' match with '&': )" << std::boolalpha << std::regex_match("&", pattern) << std::endl; }