下面是一个非常简单的C ++正则表达式程序
#include<string>
#include<iostream>
#include<regex>
using namespace std;
int main()
{
regex re( "^([^\\.]+\\.?)+$" , regex::icase);
smatch match;
if (regex_search(string("abcd.com") , match, re) )
cout<<"Match Found";
else
cout<<"Not Found";
return 0;
}
VC ++ 2010说&#34; Not Found&#34;
g ++说&#34; Match Found&#34;
为什么?