D
Dave
#define BOOST_REGEX_DYN_LINK
#include <iostream>
#include <boost\regex.hpp>
using namespace boost;
using namespace std;
int main()
{
regex reg_exp("\xF8.\x2A..\x0D(P|V)[0-9A-F]{3}");
// I would expect this to match, and it does.
cout << regex_match("\xF8p\x2Aqf\x0DPFFF", reg_exp) << endl;
// I would expect this to *not* match due to the 'w'.
// Why does it match?
cout << regex_match("\xF8p\x2Aqfw\x0DPFFF", reg_exp) << endl;
}
#include <iostream>
#include <boost\regex.hpp>
using namespace boost;
using namespace std;
int main()
{
regex reg_exp("\xF8.\x2A..\x0D(P|V)[0-9A-F]{3}");
// I would expect this to match, and it does.
cout << regex_match("\xF8p\x2Aqf\x0DPFFF", reg_exp) << endl;
// I would expect this to *not* match due to the 'w'.
// Why does it match?
cout << regex_match("\xF8p\x2Aqfw\x0DPFFF", reg_exp) << endl;
}