I\'m trying to get the contents of a tag from a webpage in python. I used the following code: matchResult = re.search(r\'
matchResult = re.search(r\'
Include the re.DOTALL option as well, that will allow the . character to match newlines.
re.DOTALL
.