#include #include int main() { std::regex const pattern { "[^[:alpha:]]" }; std::cout << "'[^[:alpha:]]' match with 'a': " << std::boolalpha << std::regex_match("a", pattern) << std::endl; std::cout << "'[^[:alpha:]]' match with '1': " << std::boolalpha << std::regex_match("1", pattern) << std::endl; std::cout << "'[^[:alpha:]]' match with '&': " << std::boolalpha << std::regex_match("&", pattern) << std::endl; }