I have some boost Regex code which I think should fire. I’m new to boost but I know a little bit of Regex. Here’s the code that I’m using.
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))
and here is the test string I’m using.
this is a test
-------- Original Message --------
everything under here should disappear
My code compiles and runs, it just doesn’t trigger the if statement. I tried debugging into the boost code and … yeah…
regex_match
regex_search
So, use
boost::regex_search. Example.http://liveworkspace.org/code/fa35778995c4bd1e191c785671ab94b6