Why does this re.matchreturn an object None, while a similar one re.findallreturns a non-empty result?
I am parsing email topics. The one in question
subject = "=?UTF-8?B?0JLQsNGI0LUg0YHQvtC+0LHRidC10L3QuNC1INC90LUg0LTQvtGB0YLQsNCy0LvQtdC90L4=?=. Mail failure."
I wonder why
re.match("mail failure", subject, re.I) returns a None object pointing to an instance
re.findall("mail failure", subject, re.I) returns a matching string in the list ['Mail failure']
What is wrong in my thoughts?
source
share