#include <iostream>
#include <string>
#include <regex>
using namespace std;
int main ()
{
if (std::regex_match ("http://www.google.com", std::regex("(http|https):\/\/(\w+\.)*(\w*)\/([\w\d]+\/{0,1})+")))
std::cout << "valid URL \n";
std::cout << std::endl;
return 0;
}
它与警告一起编译,但是当我执行它时
terminate called after throwing an instance of 'std::regex_error'
what(): regex_error
中止(核心转储)
我该做什么?