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;
}
use wregex and wsmatch
I believe so, but you'll need to use boost::wsmatch
instead of smatch
, and wregex
as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With