Why does this C++11 code throw a regex_error?
string s{R"((http)(s)?(:\/\/)(www\.)?([^ ]*))"};
regex r{s}; // throws regex_error
I've been looking all over the internet for correct escaping and I've tried multiple combinations, but I think my escaping is correct. What am I doing wrong?