Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Regular expressions send different result in Visual Studio 2010 and Visual Studio 2008

Regular expressions send different result in Visual Studio 2010 and Visual Studio 2008

Scheduled Pinned Locked Moved C / C++ / MFC
visual-studioregexcsharpquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    BadJerry
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups