http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57173
Bug #: 57173 Summary: Regex match group contain extraneous character... Classification: Unclassified Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: mj...@mailinator.com Created attachment 30032 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30032 a small program that encapsulates the issue summary: I have a regex built from "/asdf(/.*)" I match this regex against this string: "/asdf/qwerty" expected output std::smatch: 1) /asdf/qwerty 2) /qwerty actual output std::smatch: 1) /asdf/qwerty 2) f/qwerty Notice that in (2) of the actual output, there's a prefix "f" which shouldn't be there... compile command: g++ -std=c++11 -Wall -Wextra foo.cpp g++ version: g++ (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2 program output: result: 1 match: /asdf/qwerty match: f/qwerty