boost::regex re;
re = "(\\d+)";
boost::cmatch matches;
if (boost::regex_search("hello 123 world", matches, re))
{
printf("Found %s\n", matches[1]);
}
Result: "Found 123 world". I just wanted the "123". Is this some problem with null-termination, or just misunderstanding how regex_search works?