#include <regex>
#include <string>
#include <iostream>
using namespace std;
int main()
{
string regx = R"(^\d{1,2}(\.\d{1,2})+$)";
string input = "1.2.346";
smatch matches;
if (regex_search(input, matches, regex(regx)))
{
cout<<"match found";
}
else
cout<<"No match found";
return 0;
}
I2luY2x1ZGUgPHJlZ2V4PgojaW5jbHVkZSA8c3RyaW5nPgojaW5jbHVkZSA8aW9zdHJlYW0+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CiAgICAgCmludCBtYWluKCkKewoJc3RyaW5nIHJlZ3ggPSBSIiheXGR7MSwyfShcLlxkezEsMn0pKyQpIjsKICAgIHN0cmluZyBpbnB1dCA9ICIxLjIuMzQ2IjsKICAgIHNtYXRjaCBtYXRjaGVzOwogICAgCSAgICBpZiAocmVnZXhfc2VhcmNoKGlucHV0LCBtYXRjaGVzLCByZWdleChyZWd4KSkpCiAgICAJICAgIHsKICAgIAkgICAgICAgIGNvdXQ8PCJtYXRjaCBmb3VuZCI7CiAgICAJICAgIH0KICAgIAkgICAgZWxzZQogICAgCSAgICAJY291dDw8Ik5vIG1hdGNoIGZvdW5kIjsKICAgIAlyZXR1cm4gMDsKIH0=