我有一些boost的regex代码,我认为应该触发。我是新来的助推器,但我知道一点正则表达式。这是我正在使用的代码。Boost :: regex_match没有触发
re = boost::basic_regex<TCHAR>(_T("-+\\s+Original\\s+Message\\s+-+"), boost::regex_constants::icase);
boost::match_results<TSTRING::const_iterator> result;
if(boost::regex_match(RawBody, result, re))
这里是我正在使用的测试字符串。
this is a test
-------- Original Message --------
everything under here should disappear
我的代码编译并运行,它只是不会触发if语句。我试图调试到升压代码和...是...
使用regex_search而不是regex_match。 – ForEveR 2012-08-01 20:59:28