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