A
A
I probably missed something stupid but why is this matching extra
characters?
if (boost::regex_search("bla bla (message #12345)",
matches,
boost::regex("\\(message #([0-9]+)\\)$")))
{
//matches[1].first contains "12345)" but regex is supposed to match only
"12345"
//matches[1].second contains ")"
}
I've tested regex in php so the regex should not match those extra chars
AFAIK
I solved this by removing the length of matches[1].second from first string
but is there something wrong with the above code or this is simply how
boost::regex works?
characters?
if (boost::regex_search("bla bla (message #12345)",
matches,
boost::regex("\\(message #([0-9]+)\\)$")))
{
//matches[1].first contains "12345)" but regex is supposed to match only
"12345"
//matches[1].second contains ")"
}
I've tested regex in php so the regex should not match those extra chars
AFAIK
I solved this by removing the length of matches[1].second from first string
but is there something wrong with the above code or this is simply how
boost::regex works?