Bug 57984 - "terminate called after throwing an instance of 'std::regex_error' what(): regex_error" during regex object construction
Summary: "terminate called after throwing an instance of 'std::regex_error' what(): ...
Status: RESOLVED DUPLICATE of bug 53631
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 4.8.1
: P3 major
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Reported: 2013-07-25 10:10 UTC by snypxy
Modified: 2013-07-25 10:38 UTC (History)
1 user (show)

See Also:
Known to work:
Known to fail:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description snypxy 2013-07-25 10:10:08 UTC
#include <regex>
#include <stdio.h>
int main(int argc, char* argv[]) {
        std::regex reg_identifier("([[:alpha:]]|_)+");
        bool is_match;
        is_match = std::regex_match("__my_var", reg_identifier);
        printf("%s\n", is_match? "Match" : "Not match");
        return 0;


terminate called after throwing an instance of 'std::regex_error'
  what():  regex_error
Comment 1 Paolo Carlini 2013-07-25 10:38:53 UTC
In 4.8.1 <regex> is unimplemented (per the Status table). We are making progress for 4.9.0.

*** This bug has been marked as a duplicate of bug 53631 ***