First program with regex not working

1
2
3
4
5
      boost::smatch matches;
      recvFIFO = "This Was Last-Modified";
      const boost::regex pattern("Last-Modified");
      const bool found = boost::regex_match(recvFIFO, matches, pattern);
      std::cout << "Modification date found : " << (found?"YES":"NO") << std::endl;

This doesn't seem to find the pattern in the string, but i don't see what i do differently than the examplesi found on the internet. I tried the code with boost or STL. recvFIFO is a std::string created earlier
match whole, search part

http://www.boost.org/doc/libs/1_53_0/libs/regex/doc/html/boost_regex/ref/regex_match.html

The C++11 std::regex is very similar.
This small distinction was the key, thanks!
Topic archived. No new replies allowed.