Question: what is the difference between re.search and re.match?
Answer: match() searches only in the first line of the string and return match object if found, else return none. ... While re.search() searches for the whole string even if the string contains multi-lines and tries to find a match of the substring in all the lines of string.