我觉得有点愚蠢,但它不起作用:
import re
a = " ebrj wjrbw erjwek wekjb rjERJK ABB RAEJKE BWE RWEJBEWJ B KREWBJ BWERBJ32J3B23B J BJ235JK BJJ523 2"
print re.match(ur'/(wekjb|ABB)/',a)
if re.match(ur'/(wekjb|ABB)/',a):
print 'success'
我有ur'
如果给定的用户a
是 unicode。wekjb
如果或ABB
在字符串中,我想打印成功,但我总是None
得到match
.