Regular expressions send different result in Visual Studio 2010 and Visual Studio 2008
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
The following code returns isMatch true in VS 2008 not in VS 2010
CString strPattern = \_T("(\\\\+|00)\\\\s\*\\\\d{2}(\\\\s?\\\\d{3}){2}\\\\s?\\\\d{4}"); CString strValue = \_T("0044 207 689 0000"); CT2CA pszFind(strPattern); const std::tr1::regex pattern(pszFind ,std::tr1::regex\_constants::nosubs | std::tr1::regex\_constants::ECMAScript); CT2CA pszData(strValue); std::string strSearch(pszData); isMatch = regex\_search(strSearch.begin(), strSearch.end(), pattern);
Any idea why? Thanks in advance