Everything builds and runs fine, I'm just not getting the result I expect. std::string sString = "Now is the time for all good men..."; std::string sRegEx1 = "^Now"; boost::regex regex1( sRegEx1 ); CPPUNIT_ASSERT( boost::regex_match(sString, regex1) ); is failing. I have to assume I'm doing something really stupid. Could someone tell me what? Thanks, - Mark
Duh on me. Thank you. - Mark John Maddock wrote:
I have to assume I'm doing something really stupid. Could someone tell me what?
Yes RTM: regex_match insists that all the text matches the expression - you want to use regex_search
John.
Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
participants (2)
-
John Maddock
-
Mark Sizer