It works on my machine, Slackware 12.2 with the boost package from testing/, gcc 4.2.4
What exact platform are you using?
Also, in the future, use [code] tags when posting, like
Code:
#include <boost/regex.hpp>
#include <iostream>
int main(int argc, char **argv)
{
boost::regex reg("test");
bool b = boost::regex_match("A test string", reg);
if (b) {
std::cout << "Success" << std::endl;
}
else {
std::cout << "Failed!" << std::endl;
}
return 0;
}