求强人指点解决方案

求强人指点我统计单词是用MAP做的但是有BUG比如naruto,hello123nihao这个也是string类型算一个单词但是结

求强人指点
我统计单词是用MAP       做的                       但是有BUG           比如           naruto,hello123nihao                   这个也是string       类型           算一个单词              
但是结果应该是       naruto       hello       nihao       3个单词               请问有什么好的方法分割               简单点的

[解决办法]
strtok, sstream.