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

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

Nuget pack csproj using nuspec -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -