12345678910111213141516
#include <tr1/regex> #include <iostream> #include <string> int main() { std::string str = "Hello world"; std::tr1::regex rx("ello"); if (regex_match(str.begin(), str.end(), rx)) { std::cout << "WORKS"; } return 0; }