beginning with RegEx expession
Hi everyone, I want to find a text pattern using regular expresion.
I am using the regex library.
The fact is with any regular expresion throw an error.
Actually I need to find a windows alike path pattern into a text line file.
I used the following regex: "\\Peliculas", but if I try with "eliculas" or even "*" it doesn't work. An error is thrown.
I am using Ubuntu 12.04
gcc/g++ version is 4.6.3
Thanks a lot, regards
//// another code
string spch = something ;
std::regex e ("*");
if (std::regex_match (spch.c_str(),e))
cout << "found pattern " << endl;
cout << "didn't find pattern " << endl;
catch (std::regex_error& e)
// message error
Last edited on
Could you post what the error is that is thrown? E.g. print out
e.what() and paste it here.
This the output error into the terminal:
terminate called after throwing an instance of 'std:regex_error'
Thanks for your help
Topic archived. No new replies allowed.