
Dear all, Given this code. I expect to get this output from the corresponding input: Input: FOO Output: Match Input: FOOBAR, Output: Match Input: BAR, Output: No Match But why it gives "No Match" for input FOOBAR? __BEGIN__ #include <iostream> #include <vector> #include <fstream> #include <sstream> #include <boost/regex.hpp> using namespace std; using namespace boost; int main ( int arg_count, char *arg_vec[] ) { if (arg_count !=2 ) { cerr << "expected one argument" << endl; return EXIT_FAILURE; } string InputString = arg_vec[1]; string toMatch = "FOO"; const regex e(toMatch); if (regex_match(InputString, e,match_partial)) { cout << "Match" << endl; } else { cout << "No Match" << endl; } return 0; }