bool match=0;
string pattern, domain="sub1.example.org";
while(res->next())
{
pattern.append("(.+\\.)?");
pattern.append(res->getString(1));
std::regex RE(pattern);
cout << pattern << "-" << domain << endl;
pattern.clear();
if((match=regex_match(domain, RE)))
break;
}
That one above does not match, altough output is this:
(.+\.)?example.org-sub1.example.org
(.+\.)?example.orgg-sub1.example.org
(.+\.)?sdasd.com-sub1.example.org
I guess I am too sleepy or something, can somebody help me out?
EDIT: gcc 4.6.3