I´m looking for a regular expression in C++11 which can match a substring in a string.
Something like: "It´s a dark night out there..."
and I´m searching for ark
So if a substring is somewhere in a string this expression shall match. Furthermore i would like to have the option to say that this match should be case sensitive or not.
I´ve already tried this but it doesn´t seem to work...
string str = "It´s a dark night out there...";
regex ex ("ark");
if (regex_match (str,ex))
cout << "Match found!";
Does anybody know something like that?