c++ - Why is the output of this regex different across g++ and vc++? -
below simple c++ regex program
#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 says "not found"
g++ says "match found"
why?
Comments
Post a Comment