#include #include int main() { std::regex const pattern { "a*" }; std::cout << "'a*' match with '': " << std::boolalpha << std::regex_match("", pattern) << std::endl; std::cout << "'a*' match with 'a': " << std::boolalpha << std::regex_match("a", pattern) << std::endl; std::cout << "'a*' match with 'aaaa': " << std::boolalpha << std::regex_match("aaaa", pattern) << std::endl; std::cout << "'a*' match with 'abcd': " << std::boolalpha << std::regex_match("abcd", pattern) << std::endl; }