str1='<a href="/states/florida/433" title="florida"><img alt="florida" src="http://abc.com"'
str2='<a href="/states/florida/433" title="florida">'
pat = re.compile('/states/.*/([^"]+)')
if ( pat.findall(str2) == pat.findall(str1)):
print "TRUE"
else:
print "FALSE"
OUTPUT: FALSE,
output2: 433
output1: abc.com
Can somebody explain?