#!/usr/bin/python import urllib2, re url = urllib2.urlopen('http://www.kernel.org') html = url.read() url.close() table = re.search(""".*?.*?""", html, re.S) print table.group('kertext'), table.group('kerver')
(?P.*?)&.*?(?P.*?)