Home Dashboard Directory Help

tr1 regex case-insensitive search not working by Fuxi


 as Fixed Help for as Fixed

Sign in
to vote
Type: Bug
ID: 674424
Opened: 6/7/2011 6:25:15 AM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
User(s) can reproduce this bug


The basic_regex class should use its traits for case/locale-sensitive matches, but it does not. Its internal _Matcher has a default-constructed traits member instead of somehow using the basic_regex traits member. Hence it always uses the global locale instead of the one imbued to the regex.
Sign in to post a comment.
Posted by Mick Bradford on 1/8/2013 at 9:14 AM
Ignore previous comment, it works fine.
Posted by Mick Bradford on 1/8/2013 at 8:43 AM
Is there a workaround for this for VS 2010?

I want a case-insensitive match to work for this:

    bool bMatch = std::regex_match(pszToMatch,
                                         std::regex(strRegex.GetString(), std::regex_constants::ECMAScript | std::regex_constants::icase));
Posted by Microsoft on 8/2/2011 at 7:44 PM

Thanks for reporting this bug. We've fixed it, and the fix will be available in VC11.

If you have any further questions, feel free to E-mail me at stl@microsoft.com .

Stephan T. Lavavej
Visual C++ Libraries Developer
Posted by MS-Moderator07 [Feedback Moderator] on 6/7/2011 at 11:06 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by MS-Moderator01 on 6/7/2011 at 6:49 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
File Name Submitted By Submitted On File Size  
SSD FACILITY MANAGEMENT PVT.docx.2.docx (restricted) 8/2/2011 -