Ok, so i\'m working on a regular expression to search out all the header information in a site.
I\'ve compiled the regular expression:
regex = re.compile
Because of the braces around the anchor tag, that part is interpreted as a capture group. This causes only the capture group to be returned, and not the whole regex match.
Put the entire regex in braces and you'll see the right matches showing up as the first element in the returned tuples.
But indeed, you should use a real parser.