【发布时间】:2014-04-11 10:26:26
【问题描述】:
如何使用 python 2.7 正则表达式计算字符串中 unicode 表情符号的数量?我尝试了为这个问题发布的第一个答案。但它一直显示无效的表达式错误。
re.findall(u'[\U0001f600-\U0001f650]', s.decode('utf-8')) 不起作用并显示无效表达式错误
How to find and count emoticons in a string using python?
“感谢您的帮助????(Emoticon1)笑脸表情摇滚!????(Emoticon2)”
计数:2
【问题讨论】:
标签: regex python-2.7 unicode emoticons