I feel kind of stupid but it does not work:
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'
I have the ur'
if the user given a
is unicode. I want to print success if wekjb
or ABB
is in the string but I always get None
as the result of the match
.