Ho seguente:Python: lista e la stringa corrispondente
temp = "[email protected]+"
lists = ["abc", "123.35", "xyz", "AND+"]
for list in lists
if re.match(list, temp, re.I):
print "The %s is within %s." % (list,temp)
L're.match è solo l'inizio della stringa, Come mi corrispondenza di sottostringa in mezzo anche.
sì, il tuo è 5 secondi più veloce in realtà, +1 – YOU