我想在Python代码中使用regex来匹配“★★★★★★☆”。这是游戏商店的东西。你知道吗
我的代码是这样的:
if re.search(ur'[\u2605\u2605\u2605\u2606\u2606]+', d) \
or re.search(ur'[\u2605\u2605\u2605\u2605\u2606]+', d)\
or re.search(ur'[\u2605\u2605\u2605\u2605\u2605]+', d):
print "High rated playstore tickets"
if re.search(u'[\u2605\u2605\u2606\\u2606\u2606]+',d) \
or re.search(u'[\\u2605\\u2606\\u2606\\u2606\\u2606]+',d):
print "Low rated tickets"
不能特别配对。 请帮忙
目前没有回答
相关问题 更多 >
编程相关推荐