This is what I tried:
std::wstring extractText(std::wstring line) { std::wstring text; boost::regex exp("^.*?PRIVMSG #.*? :(.+)"); boost::smatch match; if (boost::regex_search(line, match, exp)) { text = std::wstring(match[1].first, match[1].second); } return text; }
c ++ boost regex
coolface
source share