1234567891011121314
#include <iostream> #include <regex> using namespace std; int main() { string str = "Hello World"; tr1::regex rx("ello"); bool rv = regex_match(str.begin(), str.end(), rx); rv == true ? cout << "Found match" << endl : cout << "Not a match" << endl; return 0; }