added more delimiters for hashtag

This commit is contained in:
erqan 2014-05-15 15:27:28 +03:00
parent 7e4e6cbd2f
commit 33686c6fc5

View File

@ -1230,7 +1230,7 @@ void updateSeenHashtags(std::string &message, int64_t msgTime)
// split and look for hashtags
vector<string> tokens;
set<string> hashtags;
boost::algorithm::split(tokens,message,boost::algorithm::is_any_of(" \n\t.,:/?!;'"),
boost::algorithm::split(tokens,message,boost::algorithm::is_any_of(" \n\t.,:/?!;'\"()[]{}*"),
boost::algorithm::token_compress_on);
BOOST_FOREACH(string const& token, tokens) {
if( token.length() >= 2 ) {
@ -1497,7 +1497,7 @@ Value newpostmsg(const Array& params, bool fHelp)
// split and look for mentions and hashtags
vector<string> tokens;
boost::algorithm::split(tokens,strMsg,boost::algorithm::is_any_of(" \n\t.,:/?!;'"),
boost::algorithm::split(tokens,strMsg,boost::algorithm::is_any_of(" \n\t.,:/?!;'\"()[]{}*"),
boost::algorithm::token_compress_on);
BOOST_FOREACH(string const& token, tokens) {
if( token.length() >= 2 ) {