Bug 57173 - Regex match group contain extraneous character...
Summary: Regex match group contain extraneous character...
Status: RESOLVED DUPLICATE of bug 53631
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 4.7.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-05 00:54 UTC by mjnxf
Modified: 2013-07-24 15:16 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
a small program that encapsulates the issue (192 bytes, text/x-c++src)
2013-05-05 00:54 UTC, mjnxf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mjnxf 2013-05-05 00:54:49 UTC
Created attachment 30032 [details]
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
Comment 1 Jonathan Wakely 2013-05-05 15:49:54 UTC
std::regex is unimplemented, it's not expected to work.

*** This bug has been marked as a duplicate of bug 53631 ***
Comment 2 Jonathan Wakely 2013-07-24 15:16:45 UTC
Should be fixed by http://gcc.gnu.org/ml/gcc-cvs/2013-07/msg00643.html