This topic created in 4447 days ago, the information mentioned may be changed or developed.
Python 2.7
print(re.match(ur"[\u3002]+",u"啊。"))
居然是 None。难道句号不是 \u3002 么。。
8 replies • 2014-09-15 21:49:38 +08:00
 |
|
用re.search试一下,match是从开头匹配的
|
 |
|
findall可解w
|
 |
|
14Sep 14, 2014 via Android
4
@ Bakemono 难道我一直只会用re.findall反而避免了很多问题。。。
|
 |
|
>>> print(re.findall(r"[\u3002]+",u"啊。")) ['。']
|