Possible Duplicate:
C++0x regex in GCC
I was trying to transform a file under c++ using regex, some regex_error keeps on occuring, here is the code:
std::ifstream inf(in);
std::ofstream outf(out);
try{
std::regex line_regex("[[:alnum:]]");
std::string line;
while(std::getline(inf,line))
{
if(std::regex_match(line,line_regex))
outf<<line<<std::endl;
}
the error message is:
terminate called after throwing an instance of 'std::regex_error'
what(): regex_error
by the way, I'm using gcc 4.7.2 on linux x64.