https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124004

            Bug ID: 124004
           Summary: Positive lookahead (?=^) matches incorrectly with
                    std::regex
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
            Blocks: 102445
  Target Milestone: ---

#include <cassert>
#include <regex>
int main()
{
  assert( ! std::regex_search("ab", std::regex("a(?=^)b")) );
}

This should not match, there's no start of line before the b


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102445
[Bug 102445] [meta-bug] std::regex issues

Reply via email to