I want to match following string but receive always false and match is empty. Only if the expression is equal to the string the return value is true. My regex seems to be correct. What am I doing wrong?
#include <regex>
using namespace std;
int main()
{
regex rgx("use_gui=((true|false)); state=((bla|blub|blob))");
cmatch cm;
string s("use_gui=false; state=bla");
bool ret = regex_match(s.c_str(), cm, rgx);
}