#include<regex>
#include<string>
using namespace std;
#include<iostream>
void get()
{
std::regex ip_reg(".*[1234abcd]");//通配符匹配
std::smatch matchResult;
string inputStr;
std::getline(std::cin, inputStr);
//正则匹配
if (std::regex_match(inputStr, matchResult, ip_reg))
{
cout << "Match: ";
//打印子表达式结果
for (size_t i = 1; i < matchResult.size(); ++i)
{
cout << matchResult[i] << " " ;
}
}
else
{
cout << "Not Match!";
}
system("pause");
}
int main()
{
get();
return 0;
}